Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-CMTSStepUpgradeOperatingSystem
- Module:
- ConfigurationManager Module
Create an Upgrade OS step, which you can add to a task sequence.
Syntax
Default (Default)
New-CMTSStepUpgradeOperatingSystem
[-DriverPackage <IResultObject>]
[-DynamicUpdateSetting <DynamicUpdateOption>]
[-EditionIndex <Int32>]
[-IgnoreMessage <Boolean>]
[-ProductKey <String>]
[-ScanOnly <Boolean>]
[-SetupTimeout <Int32>]
[-SourcePath <String>]
[-StagedContent <String>]
[-UpgradePackage <IResultObject>]
[-SoftwareUpdate <IResultObject[]>]
[-Condition <IResultObject[]>]
[-ContinueOnError]
[-Description <String>]
[-Disable]
-Name <String>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet creates a new Upgrade OS step object. Then use the Add-CMTaskSequenceStep cmdlet to add the step to a task sequence. For more information on this step, see About task sequence steps: Upgrade OS.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.
Examples
Example 1
This example first uses the Get-CMOperatingSystemInstaller cmdlet to get an object for the OS upgrade package. It saves this object in the $osUpgPkg variable. The next step creates an object for the Upgrade OS step, using the $osUpgPkg object as the OS upgrade package.
It then gets a task sequence object, and adds this new step to the task sequence at index 11.
$osUpgPkg = Get-CMOperatingSystemInstaller -Name "OSUpgradePkg01"
$step = New-CMTSStepUpgradeOperatingSystem -Name "Upgrade OS" -UpgradePackage $osUpgPkg -EditionIndex 1
$tsNameOsd = "Default OS upgrade"
$tsUpg = Get-CMTaskSequence -Name $tsNameOsd -Fast
$tsUpg | Add-CMTaskSequenceStep -Step $step -InsertStepStartIndex 11
Parameters
-Condition
Specify a condition object to use with this step. To get this object, use one of the task sequence condition cmdlets. For example, Get-CMTSStepConditionVariable.
Parameter properties
| Type: | IResultObject[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | Conditions |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-ContinueOnError
Add this parameter to enable the step option Continue on error. When you enable this option, if the step fails, the task sequence continues.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Description
Specify an optional description for this task sequence step.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Disable
Add this parameter to disable this task sequence step.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | DisableThisStep |
Parameter sets
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DriverPackage
Specify a driver package object to provide its driver content to Windows Setup during upgrade. To get this package, use the Get-CMDriverPackage cmdlet.
Use the StagedContent parameter to specify the location for the driver content.
Parameter properties
| Type: | IResultObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DynamicUpdateSetting
Use this parameter to dynamically update Windows Setup with Windows Update.
DisablePolicy: Don't use Dynamic UpdateUsingPolicy: Enable setup to use Dynamic Update, such as search, download, and install updates.OverridePolicy: Temporarily override the local policy in real time to run Dynamic Update operations. The computer gets updates from Windows Update.
Parameter properties
| Type: | DynamicUpdateOption |
| Default value: | None |
| Accepted values: | DisablePolicy, UsingPolicy, OverridePolicy |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-EditionIndex
Specify an integer value of the OS upgrade package edition. Use this parameter with the UpgradePackage parameter.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IgnoreMessage
Set this parameter to $true to specify that Windows Setup completes the installation, ignoring any dismissible compatibility messages.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specify a name for this step to identify it in the task sequence.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | StepName |
Parameter sets
-ProductKey
Specify the product key to apply to the upgrade process.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ScanOnly
Set this parameter to $true to run the Windows Setup compatibility scan without starting upgrade.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SetupTimeout
Specify the number of minutes before Configuration Manager fails this step. This option is useful if Windows Setup stops processing but doesn't terminate.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SoftwareUpdate
Starting in version 2107, specify a software update object to upgrade a client's Windows OS by using a feature update. To get this object, use the Get-CMSoftwareUpdate cmdlet.
Parameter properties
| Type: | IResultObject[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SourcePath
Specify a local or network path to the Windows media that Windows Setup uses.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-StagedContent
Use this parameter with DriverPackage to specify the location for the driver content. You can specify a local folder, network path, or a task sequence variable.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-UpgradePackage
Specify an OS upgrade package object. Use the EditionIndex parameter to set the edition.
To get this object, use the Get-CMOperatingSystemInstaller cmdlet.
Parameter properties
| Type: | IResultObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet doesn't run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
IResultObject
Notes
For more information on this return object and its properties, see SMS_TaskSequence_UpgradeOperatingSystemAction server WMI class.
Related Links
Feedback
Was this page helpful?
