Skip to content

Commit

Permalink
Added the 'spo web set' command solving pnp#191
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz committed Jul 6, 2018
1 parent d362639 commit 8dd78fb
Show file tree
Hide file tree
Showing 6 changed files with 621 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/manual/docs/about/comparison-powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ Set-PnPTraceLog|SharePointPnPPowerShellOnline|
Set-PnPUnifiedGroup|SharePointPnPPowerShellOnline|[graph o365group set](../cmd/graph/o365group/o365group-set.md)
Set-PnPUserProfileProperty|SharePointPnPPowerShellOnline|
Set-PnPView|SharePointPnPPowerShellOnline|
Set-PnPWeb|SharePointPnPPowerShellOnline|
Set-PnPWeb|SharePointPnPPowerShellOnline|[spo web set](../cmd/spo/web/web-set.md)
Set-PnPWebhookSubscription|SharePointPnPPowerShellOnline|
Set-PnPWebPartProperty|SharePointPnPPowerShellOnline|
Set-PnPWebPermission|SharePointPnPPowerShellOnline|
Expand Down
44 changes: 44 additions & 0 deletions docs/manual/docs/cmd/spo/web/web-set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# spo web set

Updates subsite properties

## Usage

```sh
spo web set [options]
```

## Options

Option|Description
------|-----------
`--help`|output usage information
`-u, --webUrl <webUrl>`|URL of the subsite to update
`-t, --title [title]`|New title for the subsite
`-d, --description [description]`|New description for the subsite
`--siteLogoUrl [siteLogoUrl]`|New site logo URL for the subsite
`--quickLaunchEnabled [quickLaunchEnabled]`|Set to `true` to enable quick launch and to `false` to disable it
`-o, --output [output]`|Output type. `json|text`. Default `text`
`--verbose`|Runs command with verbose logging
`--debug`|Runs command with debug logging

!!! important
Before using this command, connect to a SharePoint Online site, using the [spo connect](../connect.md) command.

## Remarks

To update subsite properties, you have to first connect to a SharePoint site using the [spo connect](../connect.md) command, eg. `spo connect https://contoso.sharepoint.com`.

## Examples

Update subsite title

```sh
spo web set --webUrl https://contoso.sharepoint.com/sites/team-a --title Team-a
```

Hide quick launch on the subsite

```sh
spo web set --webUrl https://contoso.sharepoint.com/sites/team-a --quickLaunchEnabled false
```
1 change: 1 addition & 0 deletions docs/manual/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pages:
- web get: 'cmd/spo/web/web-get.md'
- web list: 'cmd/spo/web/web-list.md'
- web remove: 'cmd/spo/web/web-remove.md'
- web set: 'cmd/spo/web/web-set.md'
- SharePoint Framework (spfx):
- project:
- project upgrade: 'cmd/spfx/project/project-upgrade.md'
Expand Down
3 changes: 2 additions & 1 deletion src/o365/spo/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default {
WEB_ADD: `${prefix} web add`,
WEB_CLIENTSIDEWEBPART_LIST: `${prefix} web clientsidewebpart list`,
WEB_GET: `${prefix} web get`,
WEB_LIST: `${prefix} web list`,
WEB_REMOVE: `${prefix} web remove`,
WEB_LIST: `${prefix} web list`
WEB_SET: `${prefix} web set`
};
Loading

0 comments on commit 8dd78fb

Please sign in to comment.