Skip to content

Get-MigrationJobStatus

SharePoint Online: Gets migration job status

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

[CmdletBinding()]
Param(
    [guid]$PackageId
)

Process {
    try {
        $cmdArgs = @{ ErrorAction = 'Stop' }
        if ($PSBoundParameters.ContainsKey('PackageId')) { $cmdArgs.Add('PackageId', $PackageId) }
        $result = Get-SPOMigrationJobStatus @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 }
}

Optional package ID filter

An interactive directory of PowerShell scripts.