Pergunta

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

Foi útil?

Solução

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.

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top