1) Install Dependencies
-
If you wish VisualSP to be available in the modern experience for SharePoint online, then follow these instructions to add VisualSP to your tenant's SharePoint App Catalog.
NOTE: If your goal is to only deploy VisualSP to specific sites (rather than all sites in the tenant), then do not select the option to '…add it to all sites'. - Download and install the SharePoint Online Management Shell on your computer.
- Download Set-VisualSPOnline.ps1 and save in your C:\temp folder
- Open the SharePoint Online Management Shell as the administrator.
-
Install version 1.12.0 of the PnP PowerShell library for M365 by running the following command.
Install-Module PnP.PowerShell -RequiredVersion 1.12.0 -Force
2) Install VisualSP to your SharePoint Online Site
- Launch the SharePoint Online Management Shell and Run as administrator (if you don’t already have it open).
- Change to the c:\temp directory
cd c:\temp
- Enter the following 3 commands to allow use of the script you just downloaded within this window.
Import-Module PnP.PowerShell
(do not update to the 2.1.1 version if prompted)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\Set-VisualSPOnline.ps1
- Enter the following 3 commands for each site where you wish to deploy VisualSP:
Connect-PnPOnline -Interactive -Url <YourSiteURL>
Set-PnPSite -Identity <YourSiteURL> -NoScriptSite $false
Set-VisualSPOnline -SiteCollectionUrl <YourSiteURL>
-SubscriptionId "<YourSubscriptionID>" -Target Online - Visit the site collection and confirm that the VisualSP Online help tab is visible in the site collection.
3) Uninstall VisualSP Online from your SharePoint Online Site
- Download Remove-VisualSPOnline.ps1 and save in your C:\temp folder.
- Launch SharePoint Online Management Shell and Run as Administrator.
Note: If you don’t have the SharePoint Online Management Shell installed on your computer, you can download it here. - Change to the c:\temp directory
cd c:\temp
- Enter the following 3 commands to allow use of the script you just downloaded within this window.
Import-Module PnP.PowerShell
(do not update to the 2.1.1 version if prompted)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\Remove-VisualSPOnline.ps1
- Run the following command to remove VisualSP Online from a single site collection.
Remove-VisualSPOnline -Target Online -SiteCollectionUrl
Trusted Script Sources for SharePoint Online
Microsoft now requires Content Security Policies in SharePoint Online which will impact the VisualSP App for SharePoint Online. Please use the Trusted Script Sources for SharePoint Online knowledge article to address the steps that are required to ensure support for SharePoint Online