masthead.ps1 is a collection of PowerShell scripts that make managing your Masthead sites easier. Currently, the library contains:
- Install-To-Site
- Uninstall-From-Site
- Install-To-Site-And-Subsites
- Uninstall-From-Site-And-Subsites
Before you use our library, you'll need to make sure you have the latest version of the SharePoint Online Client Components SDK installed on your system.
- Download
masthead.ps1
into a local folder on your system. - Open PowerShell, and navigate to the folder containing
masthead.ps1
- Load the script into memory with the following command:
. ./masthead.ps1
- Follow the prompts to add the necessary credentials for the library to work.
Anytime you start a new session with the library you'll need to go through steps 3 and 4.
To run these functions, you'll need to make sure that the library is first loaded into memory. Once done, you can call these functions directly from the PowerShell command line.
Command | Description |
---|---|
Install-To-Site <ABSOLUTE_SITE_URL> |
Adds the version of Masthead you have installed to the target site. Make sure the URL you're using is a reference to the site without any pages on the end (ex: https://<your-site>.sharepoint.com/sites/<site-name> ) |
Uninstall-From-Site <ABSOLUTE_SITE_URL> |
Removes Masthead from the target site. Make sure the URL you're using is a reference to the site without any pages on the end (ex: https://<your-site>.sharepoint.com/sites/<site-name> ) |
Install-To-Site-And-Subsites <ABSOLUTE_SITE_URL> |
Adds the version of Masthead you have installed to the target site as well as all of its subsites (and those subsites' subsites, etc.). Make sure the URL you're using is a reference to the site without any pages on the end (ex: https://<your-site>.sharepoint.com/sites/<site-name> ) |
Uninstall-From-Site-And-Subsites <ABSOLUTE_SITE_URL> |
Removes Masthead from the target site as well as all of its subsites (and those subsites' subsites, etc.). Make sure the URL you're using is a reference to the site without any pages on the end (ex: https://<your-site>.sharepoint.com/sites/<site-name> ) |