Enable app catalog at site collection level using PowerShell

Advertisement

Enable app catalog at site collection level using PowerShell. 

In SharePoint Online we can deploy apps, SPX solutions based on our requirement to appcatalog at site collection, once we deployed at app catalog site collection solution will be available for all site collections and developers need to contact admins to deploys apps multiple times this will impact on project deliverable’s. 
To avoid this, we can enable app catalog at site collection level itself using PowerShell. 
To deploy apps at site collection level we need to enable app catalog at site collection level using PowerShell, for enabling we should require Tenant admin access (For me it is working fine with SharePoint Admin access) and to deploy apps required site collection admin access. 


To enable App catalog for multiple site collections based on our Input file. Create a CSV file  as per the below format . 

SiteURL 

https://dotnetsharepoint.sharepoint.com/sites/Site1 
https://dotnetsharepoint.sharepoint.com/sites/Site2 
https://dotnetsharepoint.sharepoint.com/sites/Site3
 

 Code  

 # SharePoint Admin URl 
$AdminURL = "https://dotnetsharepoint-admin.sharepoint.com" 
 $Cred = Get-Credential 
 #Connect to SharePoint Online 
Connect-SPOService -Url $AdminURL -Credential $Cred 
 #sites from csv 
$sites = Import-Csv -Path "D:\SitesInput.csv" 
 #Get sites one by one 
foreach($row in $sites) 
{ 
     $site = Get-SPOSite -Identity $row.SiteURL 
    $sitecollURL = $site.Url  
     Add-SPOSiteCollectionAppCatalog-Site$sitecollURL 
    Write-Host $sitecollURL 
  }  
 
 
 

Advertisements
SHARE

Lakshmi Tulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a comment