If you have a bulk of SharePoint sites, it becomes difficult to check which ShortPoint version is installed on each site ( /site collection / subsite). This is why we have created a PowerShell script which will generate a report with site URL and ShortPoint version in CSV format.


PowerShell Script

Please clone the repository (or you can download the zip): https://github.com/ShortPoint/add-in-version-check


Prerequisites


  1. You have Admin rights to SharePoint Online (Note: This script does not work for SharePoint On-Premise environment)
  2. You have a basic understanding on how to run PowerShell script;
  3. You have cloned the repository OR downloaded the PowerShell script .zip file and extracted it to your local drive;
  4. You have admin rights at the machine you plan to run the script on;
  5. Your PowerShell ExecutionPolicy is set to RemoteSigned (From your PowerShell console, you can run Set-ExecutionPolicy RemoteSigned –Force)

Executing Script


Step 1


Open PowerShell console as Administrator, just as shown below:



Step 2


Navigate to the folder where you cloned the repository or extracted the downloaded zip above:



Step 3


Execute the script by following command:


./VersionExtractorShortPoint.ps1 -SharePointAdminUrl "https://<TenancyName>-admin.sharepoint.com" -SharePointAdminUser "<Global Admin Username>" -SharePointAdminPassword "<Global Admin Password>" -CSVExportFilePath "<Full Path Name of the  CSV file where you want to get the report>" -sharePointAssembliesPath "<Path where the SharePoint Client Assemblies are located>"



Here is a description of all the parameters:


Parameter
Type
Description
SharePointAdminUrl
String
Specify the URL of your SharePoint Online Admin center. URL should be in the following format: https://<tenancyName>-admin.sharepoint.com
SharePointAdminUser
String
Specify the SharePoint Online Administrator user name. Ex. admin@shortpoint.onmicrosoft.com
SharePointAdminPassword
String
Specify the SharePoint Online Administrator password.
CSVExportFilePath
String
Specify the path with filename where you want the Script to output the results. E.g.: c:\ShortPoint\versions.csv

Note: The file should not already exist. If it does, this script will overwrite it.
sharePointAssembliesPath
String
We required following assemblies to make the script work:
  1.         Microsoft.SharePoint.Client.Runtime.dll
  2.         Microsoft.SharePoint.Client.dll
  3.         Microsoft.Online.SharePoint.Client.Tenant.dll

You can either download SharePoint Online client assemblies from MSDN OR you can use the one provided in the repository -> assemblies folder, here in this parameter you will have to specify path of the folder which contains above three assemblies.

Note: Sometimes while downloading the DLLs, operating system blocks the DLL files. You need to unblock the files before executing the PowerShell from file properties of each DLL one by one.


That's it!


Once above script is executed successfully, you can now see the CSV file generated. It will look something like this:




Thank you for your attention!


Related articles:
How to enable Scripting Capabilities with PowerShell

ShortPoint Add-in Upgrade