Guest User

Untitled

a guest
Jan 17th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. # Input credential
  2. $adminUPN="<user>@<tenant>.onmicrosoft.com"
  3. $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
  4.  
  5. # Connect to SharePoint Online Admin Center
  6. Connect-SPOService -Url https://<tenant>-admin.sharepoint.com/ -Credential $userCredential
  7.  
  8. # Get all site collections
  9. $sites = Get-SPOSite -Limit All
  10.  
  11. # Iterate the site collections
  12. foreach ($site in $sites) {
  13. Write-Host "Title: "$site.Title
  14. Write-Host "Url: "$site.Url
  15. Write-Host "-------------------------"
  16. }
Add Comment
Please, Sign In to add comment