I'm executing the below script to disable one of the document sharing options:

set-sposite -Identity "https://tenant.sharepoint.com/sites/useraccessmanagement" -DisableCompanyWideSharingLinks Disabled

This script is displaying the below error for all Group enabled SharePoint Online sites but for other sites, it is working as expected.

Error Screenshot and Error Text:

enter image description here

set-sposite : https://tenant.sharepoint.com/sites/UserAccessManagement is a Groups site collection. The valid parameters for this type of site collection are '-Identity', '-AllowSelfServiceUpgrade', '-DefaultLinkPermission', '-DefaultSharingLinkType', '-DenyAddAndCustomizePages', '-DisableCompanyWideSharingLinks', '-DisableSharingForNonOwners', '-LockState', '-Owner', '-ResourceQuota', '-ResourceQuotaWarningLevel', '-SandboxedCodeActivationCapability', '-SharingCapability', '-ShowPeoplePickerSuggestionsForGuestUsers', '-SocialBarOnSitePagesDisabled', '-StorageQuota', '-StorageQuotaReset', and '-StorageQuotaWarningLevel'. At line:1 char:1 + set-sposite -Identity "https://tenant.sharepoint.com/sites/useraccessmanageme ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Set-SPOSite], ServerException + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetSite

2 Answers 2


Update your management shell to a current version; I would strongly suggest using the PowerShell Gallery version for easy updating in the future, if you're currently using the MSI.

You will want to uninstall the MSI version prior to installing the PoSh gallery version.

  • 1
    Issue resolved after installing latest SharePoint Online Management Shell. thanks
    – George
    May 25, 2020 at 11:55

Run the PowerShell with SharePoint Online Management Shell.

Get started with SharePoint Online Management Shell for your reference:


Similar issue post for your reference:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.