Skip to content

Set-SPOSite/Set-SPOTenant: add per-site HideSyncButtonOnTeamSite, HideAddShortcutsToOneDrive and AllowOverrideHideSyncButton - #1238

Open
Chao (chaofeng2014) wants to merge 2 commits into
MicrosoftDocs:mainfrom
chaofeng2014:patch-1
Open

Chao (chaofeng2014) wants to merge 2 commits into
MicrosoftDocs:mainfrom
chaofeng2014:patch-1

Conversation

@chaofeng2014

@chaofeng2014 Chao (chaofeng2014) commented Oct 12, 2026 •

Copy link
Copy Markdown

Documents the per-site controls for the Sync and "Add shortcut to My files" buttons.

Set-SPOSite

  • HideSyncButtonOnTeamSite: hides or shows the Sync button in the document libraries of a single SharePoint site (not OneDrive). Applied only when Set-SPOTenant -AllowOverrideHideSyncButton is $true; $null returns the site to the organization-level setting.
  • HideAddShortcutsToOneDrive: hides the "Add shortcut to My files" option in the document libraries of a single SharePoint or OneDrive site (UI only). The tenant-level DisableAddShortcutsToOneDrive still turns the feature off for the whole organization.
  • Added both parameters to the ParamSet1 syntax block, parameter sections (alphabetical order), and Example 27.

Set-SPOTenant

  • AllowOverrideHideSyncButton (default $false): allows site-level HideSyncButtonOnTeamSite values to override the organization-level setting. Added to the syntax blocks and a parameter section.

Engineering PR: https://onedrive.visualstudio.com/SharePoint%20Online/_git/SPO.Core/pullrequest/2365994

…hortcutsToOneDrive

Adds two new site-level parameters to Set-SPOSite:

- `HideSyncButtonOnTeamSite`: hides the Sync button in the document libraries of a single site.
- `DisableAddShortcutsToOneDrive`: hides the "Add shortcut to My files" option in the document libraries of a single site.

Both are site-scoped counterparts of the existing Set-SPOTenant parameters of the same names, so admins can roll the behavior out site by site. They aren't supported on OneDrive sites.

Changes:
- Added both parameters to the ParamSet1 syntax block.
- Added parameter sections (alphabetical order).
- Added Example 27.

Engineering PR: https://onedrive.visualstudio.com/SharePoint%20Online/_git/SPO.Core/pullrequest/2365994
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit b51d30f:

✅ Validation status: passed

File Status Preview URL Details
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md ✅Succeeded View (sharepoint-ps)

For more details, please refer to the build report.

@AdwoodMicrosoft

Copy link
Copy Markdown

Thanks for documenting the site-scoped controls and showing how to read the resulting values. A few release/supportability details would make this safer for administrators:

  • The latest publicly released SharePoint Online Management Shell module I could verify (16.0.27709.12000) doesn't yet expose these two Set-SPOSite parameters or the corresponding Get-SPOSite properties used in Example 27. Please add the minimum supporting module version, or coordinate publication with the module release so customers don't receive parameter-not-found errors.
  • Please clarify the precedence and defaults when the tenant-level and site-level values differ. For example, can a site-level $false override a tenant-wide $true, or does the tenant setting always win?
  • Confirm the supported site templates. The text says all specified non-OneDrive sites, while the parameter name HideSyncButtonOnTeamSite could imply only team sites.
  • For DisableAddShortcutsToOneDrive, consider saying that the option is hidden rather than that users "can't add shortcuts," unless engineering confirms the setting blocks every supported creation path rather than only the document-library UI.

The build and policy checks pass; these questions are about runtime availability and exact product behavior rather than rendering.

@samkabue-msft Sam M. Kabue (samkabue-msft) added the Back to submitter The pull request didn't pass the review criteria and has been returned to the writer for updates label Oct 13, 2026
… design

- Set-SPOSite: rename -DisableAddShortcutsToOneDrive to -HideAddShortcutsToOneDrive (UI only; also allowed on OneDrive sites).
- Set-SPOSite: -HideSyncButtonOnTeamSite is applied only when Set-SPOTenant -AllowOverrideHideSyncButton is $true; $null returns the site to the organization setting; document EffectiveHideSyncButtonOnTeamSite / EffectiveHideAddShortcutsToOneDrive.
- Set-SPOSite: update Example 27.
- Set-SPOTenant: add -AllowOverrideHideSyncButton.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3137df6e-7ef7-4576-be23-b36c6c4c897d
@chaofeng2014

Copy link
Copy Markdown
Author

Thanks for the review! Updates in the latest commit:

  1. Supported site templates: HideSyncButtonOnTeamSite can be set on SharePoint sites (team sites with or without a Microsoft 365 group, communication sites, and classic sites), but not on OneDrive sites, matching the tenant-level HideSyncButtonOnTeamSite, where OneDrive Sync is controlled by a separate setting. HideAddShortcutsToOneDrive can be set on both SharePoint and OneDrive sites. The parameter sections now state this explicitly.
  2. "Hidden" vs "can't add": agreed. The site-level setting is now named HideAddShortcutsToOneDrive (instead of DisableAddShortcutsToOneDrive) because it only hides the option in the browser; adding shortcuts still works through other paths. Each parameter now has a note that it's UI-only.
  3. Minimum module version: the parameters ship in an upcoming SharePoint Online Management Shell release. We'll hold this PR until that release is public and add the minimum version then.
  4. Tenant vs site precedence:
    • Sync: the tenant setting is the default for every site. A site-level value (including $false) overrides it only when the new tenant setting AllowOverrideHideSyncButton is $true (default $false). Get-SPOSite returns the site-level value (empty when not set) and the applied value EffectiveHideSyncButtonOnTeamSite. This PR also documents the new Set-SPOTenant -AllowOverrideHideSyncButton parameter.
    • Add shortcut: the tenant DisableAddShortcutsToOneDrive turns the feature off for the whole organization, so a site can't turn it back on. HideAddShortcutsToOneDrive only hides the option on additional sites. Get-SPOSite returns EffectiveHideAddShortcutsToOneDrive, which is $true when either setting hides the option.

@chaofeng2014 Chao (chaofeng2014) changed the title Update Set-SPOSite.md to add HideSyncButtonOnTeamSite and DisableAddS… Set-SPOSite/Set-SPOTenant: add per-site HideSyncButtonOnTeamSite, HideAddShortcutsToOneDrive and AllowOverrideHideSyncButton Oct 14, 2026
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 3dd9354:

✅ Validation status: passed

File Status Preview URL Details
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOSite.md ✅Succeeded View (sharepoint-ps)
sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Set-SPOTenant.md ✅Succeeded View (sharepoint-ps)

For more details, please refer to the build report.

@github-actions

Copy link
Copy Markdown

Dinesh Hariharan (@dineshariharan) sachin-lalwani
You've been added as a reviewer to this pull request because you're listed as a Content Lead for the product area or feature covered by one or more articles in this PR.

Before this PR can be merged, a Content Lead needs to add the Sign off label to it. Only one of the listed reviewers needs to add the Sign off label. Before you sign off a PR, confirm the following:

  • The PR is not in draft state. When the changes in this PR are ready to be published, select the Ready to merge button at the bottom of the page.
  • Article content has been checked for technical accuracy.
  • There are no errors or warnings in build validation.
  • There are no severity 1 or 2 PoliCheck issues.
  • All required PR checks at the bottom of the PR are passing.

After you've confirmed the above, do the following to sign off:

  1. Select the gear next to Labels.
  2. Select Sign off from the label list.
  3. Click away from the label list.

image

After you've signed off, our operations (PubOps) team will review the PR for issues that may impact formatting and the customer experience. If any changes are needed, they will return
the PR to the submitter with required changes. After they've completed those changes, you need to sign off again.

When the PR passes PubOps review, they'll merge the PR. If the PR is merged into the main branch, changes will go live within the next couple hours.

If you think you were incorrectly added as a reviewer, have questions about this process, or need help signing off on this PR, post a message to https://aka.ms/tcphelp.

@samkabue-msft Sam M. Kabue (samkabue-msft) added Sign off The pull request is ready to be reviewed and merged by PubOps and removed Back to submitter The pull request didn't pass the review criteria and has been returned to the writer for updates labels Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sharepoint-server-itpro/svc Sign off The pull request is ready to be reviewed and merged by PubOps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants