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

PowerShell CMDLET for enabling / disabling to create site collection app catalog
PowerShell CMDLET for enabling / disabling to create site collection app catalog

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-SPOSiteCollectionAppCatalog cmdlet passing the site collection where the app catalog should be created as the -Site parameter.

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
fig : Microsoft 365 - SharePoint Online - App Catalog enabled for site - https://knowledgejunction1.sharepoint.com - "Apps for SharePoint" list is appeared
fig : Microsoft 365 – SharePoint Online – App Catalog enabled for site – https://knowledgejunction1.sharepoint.com – “Apps for SharePoint” library available
  • We will upload and deploy our SPFx component in “Apps for SharePoint” library as
fig : Microsoft 365 - SharePoint Online - Apphttps://knowledgejunction1.sharepoint.com - "Apps for SharePoint" library
fig : Microsoft 365 – SharePoint Online – App Catalog https://knowledgejunction1.sharepoint.com – “Apps for SharePoint” library

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-SPOSiteCollectionAppCatalog cmdlet passing the site collection where the app catalog should be disabled as the -Site parameter.

Remove-SPOSiteCollectionAppCatalog -Site https://knowledgejunction1.sharepoint.com/

Thanks for reading !!! HAVE a FANTASTIC LEARNING AHEAD !!! LIFE IS BEAUTIFUL 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading