diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md index d65d5bce3..78eb81dbf 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md @@ -68,7 +68,8 @@ Set-SPOSite [-Identity] [-Owner ] [-Title ] [- [-ListsShowHeaderAndNavigation ] [-HidePeoplePreviewingFiles ] [-HidePeopleWhoHaveListsOpen ] [-IsAuthoritative ] [-AllowFileArchive ] [-AllowWebPropertyBagUpdateWhenDenyAddAndCustomizePagesIsEnabled ] [-DisableSiteBranding ] - [-DisableClassicPageBaselineSecurityMode ] + [-DisableClassicPageBaselineSecurityMode ] [-HideSyncButtonOnTeamSite ] + [-HideAddShortcutsToOneDrive ] [-WhatIf] [-Confirm] [] ``` @@ -404,6 +405,16 @@ Get-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 | Select-Object Example 26 restricts Agent Users from accessing the site and then returns the configured value. The policy is enforced at runtime and doesn't remove existing permissions. +### Example 27 + +```powershell +Set-SPOTenant -HideSyncButtonOnTeamSite $true -AllowOverrideHideSyncButton $true +Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -HideSyncButtonOnTeamSite $false +Get-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 | Select-Object Url, HideSyncButtonOnTeamSite, EffectiveHideSyncButtonOnTeamSite +``` + +Example 27 hides the **Sync** button for all SharePoint sites in the organization, allows sites to override that setting, and then shows the **Sync** button again on site1. The last command returns the site-level value and the value that's applied to the site. + ## PARAMETERS ### -AddInformationSegment @@ -1405,6 +1416,31 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -HideAddShortcutsToOneDrive + +> Applicable: SharePoint Online + +Hides the [Add shortcut to My files](https://support.microsoft.com/office/add-shortcuts-to-shared-folders-in-onedrive-for-work-or-school-d66b1347-99b7-4470-9360-ffc048d35a33) option in the document libraries of the site. When `HideAddShortcutsToOneDrive` is set to `$true`, the option is hidden for users who browse the site. Shortcuts that users already added remain in their OneDrive. + +This setting applies only to the specified site, which can be a SharePoint site or a OneDrive site. The option is also hidden on every site when the `DisableAddShortcutsToOneDrive` parameter of [Set-SPOTenant](./Set-SPOTenant.md) is set to `$true`, which turns off adding shortcuts for the whole organization. To check whether the option is hidden on a site, see the `EffectiveHideAddShortcutsToOneDrive` property returned by Get-SPOSite. + +> [!NOTE] +> This setting controls only whether the option appears in the browser. Users, scripts, APIs, and agents can still add shortcuts to the site's content by other means. To turn off adding shortcuts for the whole organization, use `Set-SPOTenant -DisableAddShortcutsToOneDrive $true`. + +PARAMVALUE: True | False + +```yaml +Type: System.Boolean +Parameter Sets: ParamSet1 +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -HidePeoplePreviewingFiles > Applicable: SharePoint Online @@ -1449,6 +1485,31 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -HideSyncButtonOnTeamSite + +> Applicable: SharePoint Online + +Hides or shows the **Sync** button in the document libraries of the site. When `HideSyncButtonOnTeamSite` is set to `$true`, users can't start syncing the site's libraries with the OneDrive sync app from the browser. When it's set to `$false`, the **Sync** button is shown. + +This setting applies only to the specified site. It can be set on SharePoint sites, such as team sites and communication sites, but not on OneDrive sites. A site that has no site-level value uses the `HideSyncButtonOnTeamSite` setting of [Set-SPOTenant](./Set-SPOTenant.md). The site-level value is applied only when `AllowOverrideHideSyncButton` is set to `$true` with Set-SPOTenant. To remove the site-level value so that the site uses the organization-level setting again, set this parameter to `$null`. Get-SPOSite returns an empty `HideSyncButtonOnTeamSite` value for a site that has no site-level value; to check which value is applied to a site, see the `EffectiveHideSyncButtonOnTeamSite` property. + +> [!NOTE] +> This setting controls only whether the **Sync** button appears in the browser. Users, scripts, APIs, and agents can still start syncing the site's libraries by other means. To prevent a library from being synced, turn off the library's **Offline Client Availability** setting. + +PARAMVALUE: True | False + +```yaml +Type: System.Boolean +Parameter Sets: ParamSet1 +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -HubSiteId > Applicable: SharePoint Online diff --git a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md index 7a7e1a2b0..a7ba29367 100644 --- a/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md +++ b/sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md @@ -105,6 +105,7 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-AppBypassInformationBarriers ] [-AppAccessInformationBarriersAllowList ] [-AllOrganizationSecurityGroupId ] [-DisableModernListTemplateIds ] [-EnableModernListTemplateIds ] [-HideSyncButtonOnTeamSite ] + [-AllowOverrideHideSyncButton ] [-AllowGuestUserShareToUsersNotInSiteCollection ] [-StreamLaunchConfig ] [-DelegateRestrictedContentDiscoverabilityManagement ] [-DelegateRestrictedAccessControlManagement ] [-DisableOutlookPSTVersionTrimming ] @@ -244,6 +245,7 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-AppBypassInformationBarriers ] [-AppAccessInformationBarriersAllowList ] [-AllOrganizationSecurityGroupId ] [-DisableModernListTemplateIds ] [-EnableModernListTemplateIds ] [-HideSyncButtonOnTeamSite ] + [-AllowOverrideHideSyncButton ] [-AllowGuestUserShareToUsersNotInSiteCollection ] [-StreamLaunchConfig ] [-DelegateRestrictedContentDiscoverabilityManagement ] [-DelegateRestrictedAccessControlManagement ] [-DisableOutlookPSTVersionTrimming ] @@ -384,6 +386,7 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-AppBypassInformationBarriers ] [-AppAccessInformationBarriersAllowList ] [-AllOrganizationSecurityGroupId ] [-DisableModernListTemplateIds ] [-EnableModernListTemplateIds ] [-HideSyncButtonOnTeamSite ] + [-AllowOverrideHideSyncButton ] [-AllowGuestUserShareToUsersNotInSiteCollection ] [-StreamLaunchConfig ] [-DelegateRestrictedContentDiscoverabilityManagement ] [-DelegateRestrictedAccessControlManagement ] [-DisableOutlookPSTVersionTrimming ] @@ -522,7 +525,8 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-AppBypassInformationBarriers ] [-DefaultOneDriveInformationBarrierMode ] [-AppAccessInformationBarriersAllowList ] [-AllOrganizationSecurityGroupId ] [-DisableModernListTemplateIds ] [-EnableModernListTemplateIds ] - [-HideSyncButtonOnTeamSite ] [-AllowGuestUserShareToUsersNotInSiteCollection ] + [-HideSyncButtonOnTeamSite ] + [-AllowOverrideHideSyncButton ] [-AllowGuestUserShareToUsersNotInSiteCollection ] [-StreamLaunchConfig ] [-DelegateRestrictedContentDiscoverabilityManagement ] [-DelegateRestrictedAccessControlManagement ] [-DisableOutlookPSTVersionTrimming ] [-MediaTranscription ] @@ -660,6 +664,7 @@ Set-SPOTenant [-MinCompatibilityLevel ] [-MaxCompatibilityLevel ] [-AppBypassInformationBarriers ] [-AppAccessInformationBarriersAllowList ] [-AllOrganizationSecurityGroupId ] [-DisableModernListTemplateIds ] [-EnableModernListTemplateIds ] [-HideSyncButtonOnTeamSite ] + [-AllowOverrideHideSyncButton ] [-AllowGuestUserShareToUsersNotInSiteCollection ] [-StreamLaunchConfig ] [-DelegateRestrictedContentDiscoverabilityManagement ] [-DelegateRestrictedAccessControlManagement ] [-DisableOutlookPSTVersionTrimming ] @@ -1355,6 +1360,30 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -AllowOverrideHideSyncButton + +> Applicable: SharePoint Online + +Allows a site-level `HideSyncButtonOnTeamSite` value, set with Set-SPOSite, to override the organization-level `HideSyncButtonOnTeamSite` setting. + +The valid values are: + +- False (default) - The organization-level setting applies to every site. Site-level values are saved but not applied. + +- True - Sites that have a site-level value use it. Other sites use the organization-level setting. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AllowSelectSecurityGroupsInSPSitesList > Applicable: SharePoint Online