Skip to content

Upgrade-Site

SharePoint Online: Starts the upgrade process on a site collection

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

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [string]$Identity,
    [switch]$NoEmail,
    [switch]$QueueOnly,
    [switch]$VersionUpgrade
)

Process {
    try {
        $cmdArgs = @{ ErrorAction = 'Stop'; Identity = $Identity; NoEmail = $NoEmail; QueueOnly = $QueueOnly; VersionUpgrade = $VersionUpgrade; Confirm = $false }
        $result = Upgrade-SPOSite @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 }
}

URL of the site collection to upgrade

Off

Do not send notification email upon completion

Off

Add to upgrade queue without immediate execution

Off

Perform a version-to-version upgrade

An interactive directory of PowerShell scripts.