Forum Discussion
Unable to Share with External Users
Thank you for this information.
Been battling to share stuff for days - couldn't figure out why it didn't work.
Can someone please share the step by step guide for powershell ?
- Dale RobertsonDec 12, 2017Copper Contributor
Install SPO PowerShell Module:
https://www.microsoft.com/en-us/download/details.aspx?id=35588
RUN AS ADMIN
TO CONNECT:
$adminUPN="admin@yourdomain.net"
$orgName="Contoso"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://yourcompany-admin.sharepoint.com -Credential $userCredential
- Rick KloorNov 06, 2018Copper Contributor
Sorry to Hijack this post, but when i use this script i get the message that :
set-sposite : You can’t set the sharing capability to the level you specified, because it is a less restrictive setting than either its parent site collection or your
organization.
- Dale RobertsonDec 12, 2017Copper Contributor
Yes this was using SharePoint Online Management shell which you can get here:
https://www.microsoft.com/en-ca/download/details.aspx?id=35588Note: to run this you have to be a "Global Admin" or it won't work.
$adminUPN="replace_with_admin-username"
$orgName="Company Name"
$usercredential = Get-Credential -username $adminUPN -Message "type password"
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
$siteurl="https://$orgName.sharepoint.com/sites/desired_site_collection"
set-sposite -identity $siteurl -sharingcapability ExternalUserAndGuestSharingThe
"Connect-SPOService -Url https://$orgName-admin.sharepoint.com"
URL you get from Sharepoint online admin center
- Terry DurdenAug 13, 2018Copper Contributor
Our SP Administrator tried to run the Powershell script and received the following error:
set-sposite : The managed path xxxx/SitePages is not a managed path in this tenant.