Redigera

Dela via


Upgrade-SPSite

Starts the upgrade process on a site collection.

Syntax

Upgrade-SPSite
       [-Identity] <SPSitePipeBind>
       [-AssignmentCollection <SPAssignmentCollection>]
       [-Confirm]
       [-Email]
       [-QueueOnly]
       [-Unthrottled]
       [-VersionUpgrade]
       [-WhatIf]
       [-Priority <Byte>]
       [<CommonParameters>]

Description

The Upgrade-SPSite cmdlet starts the upgrade process on a site collection.

The Upgrade-SPSite cmdlet activates the upgrade process for the specified SPSite object. You can also use this cmdlet to resume failed upgrades. When you use this cmdlet to initiate upgrade on an SPSite object, the object can be either a build-to-build or version-to-version upgrade.

By default, the Upgrade-SPSite cmdlet operates as a build-to-build upgrade. This prevents unexpected version upgrades of site collections if you use this cmdlet after a patching operation. When in version-to-version upgrade mode, site collection health checks are run in repair mode to ensure that the site collection is healthy enough to upgrade successfully. If successful, the remainder of the upgrade occurs.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

-------------EXAMPLE 1----------

Upgrade-SPSite https://<site name>/sites/testsite

This example upgrades the existing https://<site name>/sites/testsite site collection by using only build-to-build upgrade actions. The SPSite.CompatibilityLevel will not be changed by this operation.

-------------EXAMPLE 2----------

Upgrade-SPSite https://<site name>/sites/testsite -VersionUpgrade

This example upgrades the existing https://<site name>/sites/testsite site collection by using only build-to-build upgrade actions. The SPSite.CompatibilityLevel will not be changed by this operation.

Parameters

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Confirm

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Email

Specifies whether to send mail on completion of the site collection upgrade.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

Specifies the SPSite object to run upgrade operations against.

Type:SPSitePipeBind
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Priority

Specifies what priority to upgrade the site.

The valid values are:

  • 128 - 255 (Low Priority)

  • 11 - 127 (Normal Priority)

  • 0 - 10 (High Priority)

Type:Byte
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-QueueOnly

Specifies to put the site into the queue for a delayed upgrade that is managed by a timer job.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Unthrottled

Specifies a farm administrator to bypass the throttle which permits a site collection to be upgraded even if there are "too many" site collections in the throttle to be upgraded.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-VersionUpgrade

Specifies to perform a version-to-version upgrade on the SPSite object. When this parameter is set, it internally triggers all available build-to-build actions that are associated with the current site collection operating mode. Version-to-version actions follow to bring site collections to the next site collection operating mode inclusive of all new build-to-build actions that are associated with the new site collection operating mode. When this parameter is not set, it triggers only available build-to-build upgrade actions that are associated with the current site collection operating mode.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition