We can fetch all personal sites that are provisioned in our tenant using the below scripts.
- #Parameter required
- Param(
- [string]$Username,
- [string]$Password,
- [string]$SPAdminUrl
- )
- $SecurePassword = ConvertTo-SecureString -String $Password -AsPlainText -Force
- $Credential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $Username, $SecurePassword
- Connect-SPOService -Url $SPAdminUrl -Credential $Credential
- Write-Host "#Connected to SP Tenant"
- $OD4BSites = Get-SPOSite -IncludePersonalSite $true -Template "SPSPERS#10"
- Write-Host "There are total "$OD4BSites.Length
- Foreach($OD4BSite in $OD4BSites){
- Write-Host $OD4BSite.Url
- }

Join the conversation! Your thoughts help the community grow.