Warning: Undefined array key "rcommentid" in /var/www/busted.dk/public_html/blog/wp-content/plugins/wp-recaptcha/recaptcha.php on line 348

Warning: Undefined array key "rchash" in /var/www/busted.dk/public_html/blog/wp-content/plugins/wp-recaptcha/recaptcha.php on line 349
Share with Anyone is greyed out in SharePoint - Peter Busted

Share with Anyone is greyed out in SharePoint

Anonymous sharing link is by default disabled in a modern SharePoint site in Office 365

To enable it for all your SharePoint sites use this script:

$userCredential= Get-Credential
Connect-SPOService-Url https://NAMEOFYOURTENANT-admin.sharepoint.com -Credential $userCredential
$sites =Get-SPOSite -Limit ALL -includepersonalsite:$true
Foreach($sitein $sites)
{
Set-SPOSite-Identity $site.Url -SharingCapability ExternalUserAndGuestSharing
}
Write-Host("ExternalUserAndGuestSharingis nowupdated for all sites.")