Skip to content

Commit 563f20c

Browse files
KoenZomersVesaJuvonen
authored andcommitted
Sanitizing the Site Collection App Catalog sample commands (SharePoint#5099)
1 parent 7239b43 commit 563f20c

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

docs/general-development/site-collection-app-catalog.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,13 @@ Alternatively, you can use the [Office 365 CLI](https://sharepoint.github.io/off
6767
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.
6868
6969
```powershell
70-
# get a reference to the site collection where the
71-
# site collection app catalog should be created
72-
$site = Get-SPOSite https://contoso.sharepoint.com/sites/marketing
73-
74-
# create site collection app catalog
75-
Add-SPOSiteCollectionAppCatalog -Site $site
70+
Add-SPOSiteCollectionAppCatalog -Site https://contoso.sharepoint.com/sites/marketing
7671
```
7772
7873
Alternatively, use PnP PowerShell to add the site app catalog functionality to your site after having connected to the SharePoint Online Admin site:
7974

8075
```powershell
81-
Add-PnPSiteCollectionAppCatalog -site https://<tenant>.sharepoint.com/sites/<sitename>
76+
Add-PnPSiteCollectionAppCatalog -site https://contoso.sharepoint.com/sites/marketing
8277
```
8378

8479
Alternatively, use the `spo site appcatalog add` command if you are using the Office 365 CLI:
@@ -92,26 +87,21 @@ After executing this script, the **Apps for SharePoint** library will be added t
9287
### Disable the site collection app catalog
9388

9489
> [!NOTE]
95-
> Before running the following script, connect to your SharePoint Online tenant using the `Connect-SPOService` cmdlet for the SharePoint Online PowerShell or `spo connect` command for the Office 365 CLI.
90+
> Before running the following script, connect to your SharePoint Online tenant using the `Connect-SPOService` cmdlet for the SharePoint Online PowerShell, `Connect-PnPOnline -Url https://<tenant>-admin.sharepoint.com -UseWebLogin` for PnP PowerShell or `spo connect` command for the Office 365 CLI.
9691
9792
To disable the site collection app catalog in your site collection, use the `Remove-SPOSiteCollectionAppCatalog` cmdlet passing the site collection where the app catalog should be disabled as the `-Site` parameter. Alternatively, if you have your site collection's ID, you can use the `Remove-SPOSiteCollectionAppCatalogById` cmdlet instead.
9893

9994
> [!NOTE]
10095
> Despite the naming, the `Remove-SPOSiteCollectionAppCatalog` and `Remove-SPOSiteCollectionAppCatalogById` cmdlets don't remove the site collection app catalog from the site collection. Instead, they disable it so that it's not possible to deploy or use any solutions deployed in it.
10196
10297
```powershell
103-
# get a reference to the site collection in which
104-
# the site collection app catalog should be disabled
105-
$site = Get-SPOSite https://contoso.sharepoint.com/sites/marketing
106-
107-
# disable the site collection app catalog
108-
Remove-SPOSiteCollectionAppCatalog -Site $site
98+
Remove-SPOSiteCollectionAppCatalog -Site https://contoso.sharepoint.com/sites/marketing
10999
```
110100

111101
Alternatively, use PnP PowerShell to remove the site app catalog functionality from your site after having connected to the SharePoint Online Admin site:
112102

113103
```powershell
114-
Remove-PnPSiteCollectionAppCatalog -site https://<tenant>.sharepoint.com/sites/<sitename>
104+
Remove-PnPSiteCollectionAppCatalog -site https://contoso.sharepoint.com/sites/marketing
115105
```
116106

117107
Alternatively, use the `spo site appcatalog remove` command if you are using the Office 365 CLI

0 commit comments

Comments
 (0)