How can we help you today?

How to Get a List of SharePoint Sites Where ShortPoint is Installed

This article outlines the steps to track the site collections in your SharePoint tenancy where ShortPoint is installed, using Windows PowerShell commands.



Sample result


TABLE OF CONTENTS


Prerequisites


  • You installed ShortPoint in one or more of your SharePoint sites. 
  • You have the appropriate permissions to run Windows PowerShell commands on your SharePoint tenancy. 
  • You are a Global Administrator or equivalent on your SharePoint tenancy. 

Step 1. Launch Windows PowerShell 


Search for the Windows PowerShell ISE application and choose Run as administrator.



Search for Windows PowerShell ISE


The Windows PowerShell ISE will launch.


PowerShell App will launch


Step 2. Download PnP PowerShell 


The PnP Powershell module is needed to run the command to pull the sites that have ShortPoint. Copy the code below, paste it on the cursor, and hit Enter.

# Check if the PnP.PowerShell modle has been installed
Try {
     Write-host "Checking if PnP PowerShell Module is Installed..." -f Yellow -NoNewline
     $PnPModule = Get-Module PnP.PowerShell
     If(!$PnPModule)
    {
         Write-host "PnP PowerShell module is not installed." -f Green
        #Check if script is executed under elevated permissions - Run as Administrator
        If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
        {
            Write-Host "Please Run this script in elevated mode (Run as Administrator)! " -NoNewline
            Read-Host "Press any key to continue"
            Exit
        }
        Write-host "Installing PnP PowerShell Module..." -f Yellow -NoNewline
        Install-Module PnP.PowerShell -Force -Confirm:$False
        Write-host "Done!" -f Green
    }
    Else
    {
        Write-host "Yes!" -f Green
        Write-host "Importing PnP PowerShell Module..." -f Yellow  -NoNewline
        Import-Module PnP.PowerShell -DisableNameChecking
        Write-host "Done!" -f Green
    }
}
Catch{
    write-host "Error: $($_.Exception.Message)" -foregroundcolor red
}

If you encounter a pop-up window asking to install a NuGet provider, click Yes to install it.



Paste the code and click yes to proceed with installation


Wait for the indicator to state that the installation is done.



Installation successful.


Step 3. Connect to SharePoint tenant


To connect to the SharePoint tenancy you want to check, copy this command, paste it on the cursor, and hit Enter:

Connect-PnPOnline -Url "yourtenantname.sharepoint.com" -Interactive

Replace yourtenantname with your tenancy's name.


Insert your SharePoint tenant name

This will open a Windows log-in session. Enter your credentials:

Enter your credentials


When asked, accept the required permissions:

Accept all the permissions


A new command line will appear when this step is completed.


Step 4. Enter Site URL and credentials

Use this code to indicate the SharePoint tenancy URL and to enter your credentials. Copy the code, paste it on the command line, and hit Enter.


$tenantName = Read-Host -Prompt 'Enter your sharepoint tenant name'
#Set Parameter
$TenantSiteURL="https://$tenantName.sharepoint.com"
 
$credentials = Get-Credential



Enter code to get credentials


When a prompt appears, enter your tenant URL and hit Enter.



Enter your tenant url


This will open a log-in window. Enter your credentials and hit OK.


Hit OK.

A new command prompt will appear when you have successfully entered your credentials.


Step 5. Run command script


Copy the command script below that would retrieve the SharePoint sites with ShortPoint installed.

Connect-PnPOnline $TenantSiteURL -Credentials $credentials

#sharepoint online pnp powershell get all sites
$siteCollections =  Get-PnPTenantSite

foreach ($siteCollection in $siteCollections)
{

    Try
    {
        $connection = Connect-PnPOnline $siteCollection.Url -Credentials $credentials
        $web = Get-PnPWeb –Includes AppTiles
        $appTiles = $web.AppTiles | Where-Object {$_.Title -eq "ShortPoint SPFx"}

        if ($appTiles.Count -gt 0) {
            Write-Output $web.Url
        }
    }
    Catch{
        write-host "Error Connecting: $siteCollection.Url" -foregroundcolor red
    }
}


And paste it on the cursor.



Paste the command to the cursor


Results


Let the command run and list SharePoint site URLs, and that's it! You now have a list of all site collections that have ShortPoint.

SharePoint site with ShortPoint


Important: Once you see an error like the example below, it means that the credentials you used to connect to your tenant does not have access to that specific site:
No access to site error



How do I run the command if I already have the PnP PowerShell module installed?


If you already have the PnP PowerShell Module installed on your machine, then you can proceed with running the codes below:

Step 1. Connect to your SharePoint tenant


Copy the code below:

Connect-PnPOnline -Url <SiteURL> -Credentials (Get-Credential)


Replace <SiteURL> with the URL of your SharePoint tenant and press the Enter key.



Connect to your site tenant




Step 2. Logging into your tenant


After pressing the enter key, log in using your credentials, then press the OK button.


Logging to your site


Step 3. Run the command script


Paste the code to the cursor and press the Enter key.

Connect-PnPOnline $TenantSiteURL -Credentials $credentials

#sharepoint online pnp powershell get all sites
$siteCollections =  Get-PnPTenantSite

foreach ($siteCollection in $siteCollections)
{

    Try
    {
        $connection = Connect-PnPOnline $siteCollection.Url -Credentials $credentials
        $web = Get-PnPWeb –Includes AppTiles
        $appTiles = $web.AppTiles | Where-Object {$_.Title -eq "ShortPoint SPFx"}

        if ($appTiles.Count -gt 0) {
            Write-Output $web.Url
        }
    }
    Catch{
        write-host "Error Connecting: $siteCollection.Url" -foregroundcolor red
    }
}


The list of SharePoint sites that have ShortPoint installed will run similarly to the Results section of this article.


Related articles:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 21 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more