1. Home
  2. Installation & Configuration
  3. Install VisualSP
  4. Deploy VisualSP to SharePoint Online Via PowerShell

Deploy VisualSP to SharePoint Online Via PowerShell

Applies to: VisualSP
Print Friendly, PDF & Email
Alert!

The primary deployment method for VisualSP is the browser extension for Chrome and Edge. For most customers, deploying directly to the SPO modern interface is recommended via the App Catalog within your SharePoint Online Admin Center.

The PowerShell deployment method described below is an alternate method that is only required for limited situations:

a. You cannot deploy our browser extension, and you wish to support the classic interface for SharePoint Online.
OR
b. You wish to deploy VisualSP to only a limited number of SharePoint Online sites, and your admin account requires Multi-factor authentication.

1) Install Dependencies

  1. 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'.
  2. Download and install the SharePoint Online Management Shell on your computer.
  3. Download Set-VisualSPOnline.ps1 and save in your C:\temp folder
  4. Open the SharePoint Online Management Shell as the administrator.
  5. 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

  1. Launch the SharePoint Online Management Shell and Run as administrator (if you don’t already have it open).
  2. Change to the c:\temp directory
    cd c:\temp
  3. 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
  4. 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
  5. 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

  1. Download Remove-VisualSPOnline.ps1 and save in your C:\temp folder.
  2. 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.
  3. Change to the c:\temp directory
    cd c:\temp
  4. 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
  5. Run the following command to remove VisualSP Online from a single site collection.
    Remove-VisualSPOnline -Target Online -SiteCollectionUrl
NOTE: If you wish to follow this method for a large number of SharePoint sites, authenticating to each site separately is likely to be more repetitive than you are willing to do. In this situation, you will likely want to create an Azure App Registration using a certificate and use that to connect to each site rather than an administrator credential. If you do not have the expertise needed to do this, VisualSP offers paid deployment services to assist you through the customization steps necessary in both Azure AD and PowerShell.
Updated on January 11, 2024

Related Articles