Skip to content

Commit e056025

Browse files
authored
Update Set-SPOTenant.md
Move WhoCanShare*AllowList examples to examples section, enforce consistency in example formatting
1 parent df6a78c commit e056025

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

sharepoint/sharepoint-ps/sharepoint-online/Set-SPOTenant.md

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -301,23 +301,23 @@ This example sets manual version history limits on all new document libraries at
301301
### EXAMPLE 14
302302

303303
```powershell
304-
PS > Set-SPOTenant -SharingDomainRestrictionMode "AllowList" -SharingAllowedDomainList "contoso.com fabrikam.com"
304+
Set-SPOTenant -SharingDomainRestrictionMode "AllowList" -SharingAllowedDomainList "contoso.com fabrikam.com"
305305
```
306306

307307
This example enables users to share with external collaborators from those domains only.
308308

309309
### EXAMPLE 15
310310

311311
```powershell
312-
PS > Set-SPOTenant -SharingDomainRestrictionMode "BlockList" -SharingBlockedDomainList "contoso.com"
312+
Set-SPOTenant -SharingDomainRestrictionMode "BlockList" -SharingBlockedDomainList "contoso.com"
313313
```
314314

315315
This example enables users to share with all external collaborators except for those on the BlockedDomainList.
316316

317317
### EXAMPLE 16
318318

319319
```powershell
320-
PS > Set-SPOTenant -EnableVersionExpirationSetting $true
320+
Set-SPOTenant -EnableVersionExpirationSetting $true
321321
```
322322

323323
This example opts your tenant into public preview of Improved Version History controls feature. This feature is being tracked on the Microsoft 365 Public Roadmap under ID [145802](https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=&searchterms=145802).
@@ -329,24 +329,40 @@ By opting in, you are accepting the terms of service for version history limits.
329329
### EXAMPLE 17
330330

331331
```powershell
332-
PS > Set-SPOTenant -PrebuiltModelScope SelectedSites -PrebuiltModelSelectedSitesList "https://contoso.sharepoint.com/sites/site1","https://contoso.sharepoint.com/sites/site2" -PrebuiltModelSelectedSitesListOperation Append
332+
Set-SPOTenant -PrebuiltModelScope SelectedSites -PrebuiltModelSelectedSitesList "https://contoso.sharepoint.com/sites/site1","https://contoso.sharepoint.com/sites/site2" -PrebuiltModelSelectedSitesListOperation Append
333333
```
334334

335335
This example sets the scope of the prebuilt model and [prebuilt document processing](/microsoft-365/syntex/prebuilt-overview) premium feature to `SelectedSites`, which limits the feature to only sites included in the selected sites list. This example also appends two sites to the feature's selected sites list.
336336

337337
Use of these parameters require the tenant to either have the required license or pay-as-you-go billing set up. For more information, visit [Licensing for Microsoft Syntex](/microsoft-365/syntex/syntex-licensing).
338338

339-
### Example 18
339+
### EXAMPLE 18
340340

341341
```powershell
342-
PS > Set-SPOTenant -DefaultContentCenterSite "https://contoso.sharepoint.com/sites/contentcenter"
342+
Set-SPOTenant -DefaultContentCenterSite "https://contoso.sharepoint.com/sites/contentcenter"
343343
```
344344

345345
This example sets the tenant's default content center. It can only be used if the tenant does not already have a designated default content center. To learn more about content centers, visit [Create a content center in Microsoft Syntex](/microsoft-365/syntex/create-a-content-center).
346346

347-
348347
Use of this parameter requires the tenant to either have the required license or pay-as-you-go billing set up. For more information, visit [Licensing for Microsoft Syntex](/microsoft-365/syntex/syntex-licensing).
349348

349+
### EXAMPLE 19
350+
351+
```powershell
352+
$list = (Get-SPOTenant | Select-Object WhoCanShareAnonymousAllowList).WhoCanShareAnonymousAllowList
353+
Set-SPOTenant –WhoCanShareAnonymousAllowList ($list + <new GUID>)
354+
```
355+
356+
This example appends a security group to the WhoCanShareAnonymousAllowList. Similar code works for the WhoCanShareAuthenticatedGuestAllowList.
357+
358+
### EXAMPLE 20
359+
360+
```powershell
361+
Set-SPOTenant –WhoCanShareAnonymousAllowList @()
362+
```
363+
364+
This example empties the WhoCanShareAnonymousAllowList. Similar code works for the WhoCanShareAuthenticatedGuestAllowList.
365+
350366
## PARAMETERS
351367

352368
### -ApplyAppEnforcedRestrictionsToAdHocRecipients
@@ -3532,16 +3548,7 @@ Accept wildcard characters: False
35323548

35333549
Sets the list of security groups who are allowed to share with anonymous (non-authenticated) users as well as authenticated guest users. Each security group is denoted by its GUID object ID in the Entra directory.
35343550

3535-
To set this list to be a specific security group, you need to enter its GUID as the parameter. You can enter multiple GUIDs by using a comma to separate them, for example Set-SPOTenant –WhoCanShareAnonymousAllowList 46698648-fcd5-41fc-9526-c7f7b2ace919,544dd15b-cf3c-441b-96da-004d5a8cea1d. To view the current list, use Get-SPOTenant to get WhoCanShareAnonymousAllowList.
3536-
3537-
To add a security group to this list, use
3538-
3539-
```powershell
3540-
$list = (Get-SPOTenant | Select-Object WhoCanShareAnonymousAllowList).WhoCanShareAnonymousAllowList
3541-
Set-SPOTenant –WhoCanShareAnonymousAllowList ($list + <new guid>)
3542-
```
3543-
3544-
To remove all security groups from this list, use Set-SPOTenant –WhoCanShareAnonymousAllowList @().
3551+
To set this list to be a specific security group, you need to enter its GUID as the argument. You can enter multiple GUIDs by using commas to separate them. To view the current list, use Get-SPOTenant.
35453552

35463553
```yaml
35473554
Type: Guid[]
@@ -3559,16 +3566,7 @@ Accept wildcard characters: False
35593566

35603567
Sets the list of security groups who are only allowed to share with authenticated guest users. Each security group is denoted by its GUID object ID.
35613568

3562-
To set this list to be a specific security group, you need to enter its GUID as the parameter. You can enter multiple GUIDs by using a comma to separate them, for example Set-SPOTenant –WhoCanShareAuthenticatedGuestAllowList 46698648-fcd5-41fc-9526-c7f7b2ace919,544dd15b-cf3c-441b-96da-004d5a8cea1d. To view the current list, use Get-SPOTenant to get WhoCanShareAuthenticatedGuestAllowList.
3563-
3564-
To add a security group to this list, use
3565-
3566-
```powershell
3567-
$list = (Get-SPOTenant | Select-Object WhoCanShareAuthenticatedGuestAllowList). WhoCanShareAuthenticatedGuestAllowList
3568-
Set-SPOTenant – WhoCanShareAuthenticatedGuestAllowList ($list + <new guid>)
3569-
```
3570-
3571-
To remove all security groups from this list, use Set-SPOTenant – WhoCanShareAuthenticatedGuestAllowList @().
3569+
To set this list to be a specific security group, you need to enter its GUID as the argument. You can enter multiple GUIDs by using commas to separate them. To view the current list, use Get-SPOTenant.
35723570

35733571
```yaml
35743572
Type: Guid[]

0 commit comments

Comments
 (0)