Enabling Anonymous Share Links in SharePoint Server 201908 May 2019 | SharePoint 2019
SharePoint Server 2019 does not support anonymous sharing links (aka guest links). However, it only takes four lines of PowerShell to implement. In addition, you get link expiration. This configuration does require Office Online Server as the guest sharing links leverage the web-based Office viewer/editor. Keep in mind, this isn’t a supported configuration by Microsoft.
To enable this feature, run the following PowerShell from the SharePoint Management Shell:
$farm = Get-SPFarm $farm.Properties.Add("GuestSharingEnabled",$true) $farm.Properties.Add("SPO-GuestSharingUIEnabled",$true) $farm.Update()
When we visit a modern Document Library, we can now select the ‘Anyone’ option with link expiration:
This yields a URL similar to the following:
We can then see that a link is available with a set expiration:
However you get the link to the end user (copy link or email), here is what the recipient sees (after enabling editing):
Finally, when the link expires should you choose that option, this is what the recipient sees:
And again, this is unsupported by Microsoft. After experimenting, you can disable this functionality by running the below cmdlets.
$farm = Get-SPFarm $farm.Properties.Remove("GuestSharingEnabled") $farm.Properties.Remove("SPO-GuestSharingUIEnabled") $farm.Update()