Skip to content

Commit cdfa93d

Browse files
author
David Ramalho
committed
adding bash, adding mkdocs links and correct login
1 parent e3fd238 commit cdfa93d

3 files changed

Lines changed: 34 additions & 3 deletions

File tree

docs/manual/docs/examples/spo/adding-app-catalog.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Hide SharePoint list from Site Contents
1+
# Adding App Catalog to SharePoint site
22

33
Author: [David Ramalho](https://sharepoint-tricks.com/tenant-app-catalog-vs-site-collection-app-catalog/)
44

@@ -7,8 +7,23 @@ When you just want to deploy certain SharePoint solution to a specific site, it'
77

88
```powershell tab="PowerShell Core"
99
10-
spo login https://contoso-admin.sharepoint.com
11-
spo site appcatalog add --url https://contoso.sharepoint/sites/site
10+
$site
11+
12+
$site = "https://contoso.sharepoint.com/sites/site"
13+
o365 login
14+
o365 spo site appcatalog add --url $site
15+
Write-output "App Catalog Created on " $site
16+
```
17+
18+
```bash tab="Bash"
19+
#!/bin/bash
20+
21+
site=https://tricks365.sharepoint.com/sites/Com22
22+
23+
o365 login
24+
o365 spo site appcatalog add --url $site
25+
echo "App Catalog Created on $site"
26+
1227

1328
```
1429

docs/manual/docs/examples/spo/hide-list-from-site-contents.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ o365 login
1313
$list = o365 spo list get --webUrl $site -t $listName -o json | ConvertFrom-Json
1414
o365 spo list set --webUrl $site -i $list.Id -t $listName --hidden true
1515
16+
```
17+
```bash tab="Bash"
18+
#!/bin/bash
19+
20+
# requires jq: https://stedolan.github.io/jq/
21+
22+
site=https://tricks365.sharepoint.com/sites/Com22
23+
listName="Apps for SharePoint"
24+
25+
o365 login
26+
listId=$(o365 spo list get --webUrl $site -t "$listName" -o json | jq ".Id")
27+
o365 spo list set --webUrl $site -i $listId -t $listName --hidden true
28+
29+
1630
```
1731

1832
Keywords:

docs/manual/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,12 @@ nav:
454454
- Microsoft Graph:
455455
- 'Authenticate with and call the Microsoft Graph' : 'examples/graph/call-graph.md'
456456
- SharePoint Online:
457+
- 'Adding App Catalog to SharePoint site': 'examples/spo/adding-app-catalog.md'
457458
- 'Delete all (non-group connected) modern SharePoint sites': 'examples/spo/delete-non-group-connected-modern-sites.md'
458459
- 'Delete custom color themes from SharePoint': 'examples/spo/remove-custom-themes.md'
459460
- 'Delete custom SharePoint site designs': 'examples/spo/remove-site-designs.md'
460461
- 'Delete custom SharePoint site scripts': 'examples/spo/remove-site-scripts.md'
462+
- 'Hide SharePoint list from Site Contents':'examples/spo/hide-list-from-site-contents.md'
461463
- 'Lists active SharePoint site collection application catalogs': 'examples/spo/list-site-app-catalogs.md'
462464
- Microsoft Teams:
463465
- 'Deploy Microsoft Teams app from Azure DevOps': 'examples/teams/deploy-teams-app.md'

0 commit comments

Comments
 (0)