This article describes how you can automate the installation of the Encodian PDF Converter for SharePoint Online to multiple sites within your SharePoint tenant.
The steps in this article assume that your SharePoint Online tenancy has an App Catalog site and that the Encodian PDF Converter for SharePoint Online application package has been added to the App Catalog.
To request a copy of the Encodian PDF Converter for SharePoint Online application package, please either submit a ticket or email our support team, then follow steps 1 & 2 in this Microsoft support article to create the App Catalog and add the application package.
Attached to this article are two PowerShell scripts:
- EncodianGetAppSites.ps1 is used to create a .csv file containing all site collections and sub-sites within your tenancy.
- EncodianDeployApp.ps1 uses the .csv output of the first script to determine which sites and sub-sites to deploy the app to.
Prerequisites
In order to execute these scripts in Windows PowerShell, the following packages are required
Windows Management Framework 5.1
Obtain All Sites / Webs in your Tenant
Open EncodianGetAppSites.ps1 and set values for the following parameters:
- $orgName - this is the SPOnline organisation name as used in the URL of the SharePoint online administration site e.g. https://$orgName-admin.sharepoint.com
- $filePath – this is the folder location where the generated .csv file will be stored, e.g. “C:\Temp\”
- $fileName – this is the name of the .csv file, e.g. “deploy.csv”
Once updated, execute EncodianGetAppSites.ps1. The user will be prompted for credentials which will require tenant administration rights to execute successfully.
The generated .csv will contain the Name and URL of all sites and sub-sites alongside a Status column. To install the app on a site or sites enter the word "New" in the status column for that site.
Entries within the CSV file can be amended, deleted or new entries added as required.
Install the Application
Open EncodianDeployApp.ps1 and set values for the following parameters, which should be the same values as those set in the first script
- $orgName - this is the SPOnline organisation name as used in the URL of the SharePoint online administration site e.g. https://$orgName-admin.sharepoint.com
- $filePath – this is the folder location where the .csv generated by the first script is stored
- $fileName – this is the name of the .csv file, e.g. “deploy.csv”
Once updated, execute EncodianDeployApp.ps1 and the app will be installed to the sites indicated by the "New" status in the .csv.
Please note if the same CSV file is used for subsequent installations, the "New" status should be removed from sites where the app has already been installed.
0 Comments