0

Is it possible to do the below task using PnP powershell? What is the equivalent command?

Set-SPOSite -Identity $site -DefaultLinkToExistingAccess $true -DefaultLinkPermission "view"

0

1 Answer 1

0

To change the setting for the default link type, you can do it like this:

$site = Get-PnPTenantSite -Url "https://yourtenantname.sharepoint.com/sites/sitename"
$site.DefaultLinkToExistingAccess = $true
$site.Update()
$site.Context.ExecuteQuery()

You can also use something as in the code below, to change other sharing settings for the site:

Set-PnPSite -Sharing ExistingExternalUserSharingOnly -DefaultLinkPermission View
4
  • I have already tried this but this is setting to "Existing Guests Only" option under "External Sharing" . I am looking for "People with Existing access" under "Default sharing Link Type"
    – G_S
    Jun 9, 2020 at 21:32
  • See my updated answer. Jun 9, 2020 at 22:58
  • This does not work ether. I am getting below message The property 'DefaultLinkToExistingAccess' cannot be found on this object. Verify that the property exists and can be set.
    – G_S
    Jun 12, 2020 at 17:59
  • Can you show the full command you're using? Jun 13, 2020 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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