Skip to content

Get-CrossGeoUsers

SharePoint Online: Gets cross-geo users

#Requires -Version 5.1
#Requires -Modules Microsoft.Online.SharePoint.PowerShell

[CmdletBinding()]
Param(
    [bool]$ValidDataLocation
)

Process {
    try {
        $cmdArgs = @{ ErrorAction = 'Stop'; ValidDataLocation = $ValidDataLocation }
        $result = Get-SPOCrossGeoUsers @cmdArgs | Select-Object *
        if ($null -ne $result) { foreach ($item in $result) { $item | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force } }
    }
    catch { throw }
}

Filter by valid data location status

An interactive directory of PowerShell scripts.