Forum Discussion
John Reece
May 17, 2020Copper Contributor
Powershell to confirm onedrive geolocation
Running geo-migrations and can confirm status of move, but would like to run a report against the same list of users that confirms the current geolocation for each user's OneDrive.
Manfred101
May 20, 2020Iron Contributor
I don’t have a multi-geo tenant so I was unable to check the output, but I think the script below is showing the data where you looking for.
Goodluck!
Grtz, Manfred de Laat
$cred = Get-Credential
$url = "https://xxxxxxxxx-admin.sharepoint.com/"
Connect-SPOService $url -Credential $cred
Connect-MsolService -Credential $cred
$Users = Get-MsolUser
$UsersMoveState = @()
$UsersOneDriveLocation = @()
foreach($User in $Users){
$UsersMoveState += Get-SPOUserAndContentMoveState -UserPrincipalName $user.UserPrincipalName
$UsersOneDriveLocation += Get-SPOUserOneDriveLocation -UserPrincipalName $user.UserPrincipalName
}
write-host $UsersMoveState,$UserOneDriveLocation