#T2TMigration
Explore tagged Tumblr posts
s13cloud · 5 years ago
Text
SharePoint - Add Admin to all Sites
$AdminUser = “[email protected]
$SPOSites = Get-SPOSite -Limit All
Foreach ($SPOSite in $SPOSites) {    Write-host "Adding Site Collection Admin for:"$SPOSite.URL    Set-SPOUser -site $SPOSite -LoginName $AdminUser -IsSiteCollectionAdmin $True }
0 notes
s13cloud · 5 years ago
Text
Teams T2T Migration, set Owner and list Owners and Members
# Get all the teams from tenant   $teams=Get-Team  
#Add migration GA as Owner
$Teams | Add-TeamUser -user USERACCOUNT -Role Owner
# Loop through the teams   foreach($team in $teams)   {      Write-Host -ForegroundColor Magenta "Getting all the owners from Team: " $team.DisplayName  
   # Get the team owners      $ownerColl= Get-TeamUser -GroupId $team.GroupId -Role Owner  
   #Loop through the owners      foreach($owner in $ownerColl)      {          Write-Host -ForegroundColor Yellow "User ID: " $owner.UserId " �� User: " $owner.User  "   Name: " $owner.Name      }       }  
# Loop through the teams   foreach($team in $teams)   {      Write-Host -ForegroundColor Magenta "Getting all the members from Team: " $team.DisplayName  
   # Get the team owners      $memberColl= Get-TeamUser -GroupId $team.GroupId -Role Member  
   #Loop through the owners      foreach($member in $memberColl)      {          Write-Host -ForegroundColor Yellow "User ID: " $member.UserId "   User: " $member.User  "   Name: " $member.Name      }       }
0 notes