Microsoft 365 – SharePoint online – enable / disable the site collection App Catalog using PowerShell

Hi All,
Greetings for the day!!!
Today sharing SharePoint PowerShell CMDLET to enable / disable App Catalog at site collection level
Background
- We have implemented one custom SPFx component which is required for couple of site collections only in our tenant
- Since we have thousands of site collections in our tenant, we are not keen to deploy our SPFx component at tenant level
- So option is to have our SPFx component only for specific sites
- This is the reason we need to use site collection app catalog
- Tenant administrators can enable app catalog for specific sites
- Once Tenant administrators enabled app catalog for sites, sharepoint administrator can deploy SPFx component on those sites only
Steps to create site collection app catalog
- Connect to SharePoint online tenant using the Connect-SPOService CMDLET
- We need to pass the site collection admin URL to Url parameter
Connect-SPOService -Url <SharePoint admin site URL>
Connect-SPOService -Url https://knowledgejunction1-admin.sharepoint.com
- Once we connected to our tenant successfully we are ready to enable app catalog
- To create a site collection app catalog, use the
Add-SPOSiteCollectionAppCatalogcmdlet passing the site collection where the app catalog should be created as the-Siteparameter.
Add-SPOSiteCollectionAppCatalog -Site https://knowledgejunction1.sharepoint.com/
- Once app catalog successfully enabled for site collection, we have “Apps for SharePoint” library available as in below figure

- We will upload and deploy our SPFx component in “Apps for SharePoint” library as

Steps to disable site collection app catalog
- Connect to SharePoint online tenant using the Connect-SPOService CMDLET
Connect-SPOService -Url https://knowledgejunction1-admin.sharepoint.com
- Once we connected to our tenant successfully we are ready to disable app catalog
- To disable the site collection app catalog in our site collection, we will use
Remove-SPOSiteCollectionAppCatalogcmdlet passing the site collection where the app catalog should be disabled as the-Siteparameter.
Remove-SPOSiteCollectionAppCatalog -Site https://knowledgejunction1.sharepoint.com/
Thanks for reading !!! HAVE a FANTASTIC LEARNING AHEAD !!! LIFE IS BEAUTIFUL 🙂

You must be logged in to post a comment.