Dear Reader,
PS script
to add “everyone,
except external users” to the visitors' group.
And finding the
display name and login Name for users.
Just Replace Tenant name, organizations name, admin credentials
PS C:\WINDOWS\system32> $orgName="{Tenant name}"
PS C:\WINDOWS\system32> $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
PS C:\WINDOWS\system32> Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
Get-SPOUser -Site https://$orgName.sharepoint.com/sites/SiteName | Select DisplayName, LoginName
PS C:\WINDOWS\system32> Add-SPOUser -Site https://$orgName.sharepoint.com/sites/Coronavirus -LoginName "c:0-.f|rolemanager|spo-grid-all-users/{GUID}" -Group "Site Visitors"
Display Name Login Name Groups User Type
------------ ---------- ------ ---------
Everyone except external users spo-grid-all-users/{GUID} {Site Visitors} Member
All the Best! Thanks for reading my blog, please do comment and share if you feel helpful.
Kind Regards,
Girish Kumar
M S
No comments:
Post a Comment