1

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

1

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.

| improve this answer | |
  • 1
    Issue resolved after installing latest SharePoint Online Management Shell. thanks – George May 25 at 11:55
1

Run the PowerShell with SharePoint Online Management Shell.

Get started with SharePoint Online Management Shell for your reference:

https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps

Similar issue post for your reference:

https://techcommunity.microsoft.com/t5/sharepoint/set-sposite-lt-url-gt-is-a-groups-site-collection-the-valid/m-p/1182449

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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