Redigera

Dela via


Add-CMDeploymentTypeSupersedence

Add a deployment type supersedence. This cmdlet is deprecated.

Syntax

Add-CMDeploymentTypeSupersedence
   [-IsUninstall <Boolean>]
   [-SupersededDeploymentType] <IResultObject>
   [-SupersedingDeploymentType] <IResultObject>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Important

Starting in version 2111, this cmdlet is deprecated and may be removed in a future release. Use the Set-CMApplicationSupersedence cmdlet instead.

Use this cmdlet to set one deployment type to supersede another.

For more information, see Supersede applications in Configuration Manager.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1

There are two example applications, LOB app v7 and LOB app v6. V7 supersedes v6. The first two commands use the Get-CMDeploymentType cmdlet to get deployment type objects. It then uses those objects with to configure the supersedence relationship.

$dt7 = Get-CMDeploymentType -ApplicationName "LOB app v7" -DeploymentTypeName "Install"
$dt6 = Get-CMDeploymentType -ApplicationName "LOB app v6" -DeploymentTypeName "Install"

Add-CMDeploymentTypeSupersedence -SupersedingDeploymentType $dt7 -SupersededDeploymentType $dt6 -IsUninstall $true

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IsUninstall

If $false, the new deployment type (superseding) will upgrade the installed deployment type (superseded). If you set this parameter to $true, Configuration Manager uninstalls the previous deployment type when it installs the new deployment type.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SupersededDeploymentType

Specify a deployment type object for the application to supersede. In other words, the old deployment type. To get this object, use the Get-CMDeploymentType or Get-CMDeploymentTypeSupersedence cmdlets.

Type:IResultObject
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SupersedingDeploymentType

Specify a deployment type object for the application to supersede the other. In other words, the replacement deployment type. To get this object, use the Get-CMDeploymentType cmdlet.

Type:IResultObject
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object