I need to add an app from app catalog to the set of site collections which I need to read Site URL's from csv file using PnP PowerShell script.
Any idea how to do that?
Thanks!!
PnP PowerShell: Add an app to SharePoint Online site from App Catalog
Note:
You need site owner permissions to be able to add apps to SharePoint Online.
#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/Legal"
$AppName = "Modern Script Editor web part by Puzzlepart"
#Connect to SharePoint Online App Catalog site
Connect-PnPOnline -Url $SiteURL -UseWebLogin
#Get the App from App Catalog
$App = Get-PnPApp -Scope Tenant | Where {$_.Title -eq $AppName}
#Install App to the Site
Install-PnPApp -Identity $App.Id