How to enable external sharing in Modern Hub site using Powershell?
Hello SharePointers, Below are the power shell scripts to enable external sharing in Modern Hub site param ( [Parameter(Mandatory=$true)] [string]$HubSiteUrl, [Parameter(Mandatory=$true)][ValidateSet(“Disabled”,”ExistingExternalUserSharingOnly”,”ExternalUserSharingOnly”,”ExternalUserAndGuestSharing”)] [String]$ExternalSharing ) $HubId = (Get-SPOHubSite -ErrorAction SilentlyContinue | Where {$_.SiteUrl -eq $HubSiteURL}).Id.Guid if ($HubId -eq $null) { Throw “Not a Hub site ” } $sites = Get-SPOSite -Limit All foreach ($site in $Sites) { […]