Edit

Share via


Set-CMApplicationDeployment

Configure an application deployment

Syntax

SetApplicationDeploymentByValueMandatory (Default)

Set-CMApplicationDeployment
    -InputObject <IResultObject>
    [-AllowRepairApp <Boolean>]
    [-AutoCloseExecutable <Boolean>]
    [-AvailableDateTime <DateTime>]
    [-Comment <String>]
    [-CreateAlertBaseOnPercentFailure <Boolean>]
    [-CreateAlertBaseOnPercentSuccess <Boolean>]
    [-DeadlineDateTime <DateTime>]
    [-EnableMomAlert <Boolean>]
    [-EnableSoftDeadline <Boolean>]
    [-FailParameterValue <Int32>]
    [-OverrideServiceWindow <Boolean>]
    [-PersistOnWriteFilterDevice <Boolean>]
    [-PostponeDateTime <DateTime>]
    [-PreDeploy <Boolean>]
    [-RaiseMomAlertsOnFailure <Boolean>]
    [-RebootOutsideServiceWindow <Boolean>]
    [-ReplaceToastNotificationWithDialog <Boolean>]
    [-RequireApproval <Boolean>]
    [-SendWakeUpPacket <Boolean>]
    [-SuccessParameterValue <Int32>]
    [-TimeBaseOn <TimeType>]
    [-UseMeteredNetwork <Boolean>]
    [-UserNotification <UserNotificationType>]
    [-PassThru]
    [-Collection <IResultObject>]
    [-CollectionId <String>]
    [-CollectionName <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetApplicationDeploymentByIdMandatory

Set-CMApplicationDeployment
    -ApplicationId <String>
    [-AllowRepairApp <Boolean>]
    [-AutoCloseExecutable <Boolean>]
    [-AvailableDateTime <DateTime>]
    [-Comment <String>]
    [-CreateAlertBaseOnPercentFailure <Boolean>]
    [-CreateAlertBaseOnPercentSuccess <Boolean>]
    [-DeadlineDateTime <DateTime>]
    [-EnableMomAlert <Boolean>]
    [-EnableSoftDeadline <Boolean>]
    [-FailParameterValue <Int32>]
    [-OverrideServiceWindow <Boolean>]
    [-PersistOnWriteFilterDevice <Boolean>]
    [-PostponeDateTime <DateTime>]
    [-PreDeploy <Boolean>]
    [-RaiseMomAlertsOnFailure <Boolean>]
    [-RebootOutsideServiceWindow <Boolean>]
    [-ReplaceToastNotificationWithDialog <Boolean>]
    [-RequireApproval <Boolean>]
    [-SendWakeUpPacket <Boolean>]
    [-SuccessParameterValue <Int32>]
    [-TimeBaseOn <TimeType>]
    [-UseMeteredNetwork <Boolean>]
    [-UserNotification <UserNotificationType>]
    [-PassThru]
    [-Collection <IResultObject>]
    [-CollectionId <String>]
    [-CollectionName <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetApplicationDeploymentByNameMandatory

Set-CMApplicationDeployment
    -ApplicationName <String>
    [-AllowRepairApp <Boolean>]
    [-AutoCloseExecutable <Boolean>]
    [-AvailableDateTime <DateTime>]
    [-Comment <String>]
    [-CreateAlertBaseOnPercentFailure <Boolean>]
    [-CreateAlertBaseOnPercentSuccess <Boolean>]
    [-DeadlineDateTime <DateTime>]
    [-EnableMomAlert <Boolean>]
    [-EnableSoftDeadline <Boolean>]
    [-FailParameterValue <Int32>]
    [-OverrideServiceWindow <Boolean>]
    [-PersistOnWriteFilterDevice <Boolean>]
    [-PostponeDateTime <DateTime>]
    [-PreDeploy <Boolean>]
    [-RaiseMomAlertsOnFailure <Boolean>]
    [-RebootOutsideServiceWindow <Boolean>]
    [-ReplaceToastNotificationWithDialog <Boolean>]
    [-RequireApproval <Boolean>]
    [-SendWakeUpPacket <Boolean>]
    [-SuccessParameterValue <Int32>]
    [-TimeBaseOn <TimeType>]
    [-UseMeteredNetwork <Boolean>]
    [-UserNotification <UserNotificationType>]
    [-PassThru]
    [-Collection <IResultObject>]
    [-CollectionId <String>]
    [-CollectionName <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-CMApplicationDeployment cmdlet modifies the properties of an application deployment in Configuration Manager. For more information, see Deploy applications with Configuration Manager.

To specify an application deployment to modify, specify the collection name and the application. You can specify an application by name or ID. You can also use the Get-CMApplication cmdlet to get an application to modify.

Note

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

Examples

Example 1: Modify availability and deadline for an application deployment

Set-CMApplicationDeployment -ApplicationName "Track System 2011" -CollectionName "All Users" -AvailableDateTime (Get-Date) -DeadlineDateTime $(Get-Date).AddDays(30)

This command modifies an application deployment for an application named Track System 2011 for a collection named All Users. The command specifies the current date for when the application is available. It also configures the deployment deadline for 30 days in the future.

Parameters

-AllowRepairApp

Use this parameter to configure the repair application option when creating a deployment for an application.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AllowUserRepairApplication

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplicationId

Specifies the ID of an application.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetApplicationDeploymentByIdMandatory
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ApplicationName

Specifies the name of an application.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetApplicationDeploymentByNameMandatory
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AutoCloseExecutable

Starting in version 2107, set this parameter to $true to enable the application deployment setting for install behaviors. Then use the Add-CMDeploymentTypeInstallBehavior cmdlet to add an executable file to check isn't running for the install to succeed.

Set this parameter to $false to disable this option in the following situations:

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AutoCloseExeOnInstallBehavior

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AvailableDateTime

Specify a DateTime object for when this deployment is available. To get this object, use the Get-Date built-in cmdlet.

Use DeadlineDateTime to specify the deployment assignment, or deadline.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Collection

Specify a collection object to which the application is deployed. To get this object, use the Get-CMCollection cmdlet.

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CollectionId

Specify the ID of the collection to which the application is deployed. For example, "SMS00004".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CollectionName

Specify the name of the collection to which the application is deployed.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Comment

Specifies an optional comment for the deployment.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CreateAlertBaseOnPercentFailure

Indicates whether to create an alert for a percentage of the applications that fail to deploy. To specify the percentage value, use the FailParameterValue parameter.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CreateAlertBaseOnPercentSuccess

Indicates whether to create an alert for a percentage of the applications that deploy successfully. To specify the percentage value, use the SuccessParameterValue parameter.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeadlineDateTime

Specify a DateTime object for when this deployment is assigned, also known as the deadline. To get this object, use the Get-Date built-in cmdlet.

Use -AvailableDateTime to specify when the deployment is available.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableMomAlert

Set this parameter to $true to enable System Center Operations Manager maintenance mode for this deployment.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableSoftDeadline

Set this parameter to $true to enable delayed enforcement.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FailParameterValue

Specifies the percentage of failed application installation that causes an alert. Specify an integer from 1 through 100. To enable this alert, set the CreatAlertBaseOnPercentFailure parameter to $True.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specify an application deployment object to configure. To get this object, use the Get-CMApplicationDeployment cmdlet.

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Application, DeploymentSummary, Assignment

Parameter sets

SetApplicationDeploymentByValueMandatory
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-OverrideServiceWindow

Indicates whether the deployment takes place even if scheduled outside of a maintenance window. A maintenance window is a specified period of time used for computer maintenance and updates. If this value is $True, Configuration Manager deploys the application even if the scheduled time falls outside the maintenance window. If this value is $False, Configuration Manager doesn't deploy the application outside the window. It waits until it can deploy in an available window.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PersistOnWriteFilterDevice

Indicates whether to enable write filters for embedded devices. For a value of $True, the device commits changes during a maintenance window. This action requires a restart. For a value of $False, the device saves changes in an overlay and commits them later.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PostponeDateTime

When you set CreateAlertBaseOnPercentSuccess to $true, use this parameter to specify a DateTime object. Configuration Manager creates a deployment alert when the threshold is lower than the SuccessParameterValue after this date.

To get this object, use the Get-Date built-in cmdlet.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PreDeploy

Indicates whether to pre-deploy the application to the primary device of the user.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RaiseMomAlertsOnFailure

Indicates whether to create an Operations Manager alert if a client fails to install the application.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RebootOutsideServiceWindow

Indicates whether a computer restarts outside a maintenance window. A maintenance window is a specified period of time used for computer maintenance and updates. If this value is $True, any required restart takes place without regard to maintenance windows. If this value is $False, the computer doesn't restart outside a maintenance window.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReplaceToastNotificationWithDialog

When required software is available on the client, set this parameter to $true to replace the default toast notifications with a dialog window. It's false by default. For more information, see Replace toast notifications with dialog window.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RequireApproval

If you set this parameter to $true, an administrator must approve a request for this application on the device.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AppRequiresApproval

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SendWakeUpPacket

Indicates whether to send a wake-up packet to computers before the deployment begins. If this value is $True, Configuration Manager attempts to wake a computer from sleep. If this value is $False, it doesn't wake computers from sleep. For computers to wake, you must first configure Wake On LAN.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SuccessParameterValue

Specifies the percentage of successful application installation that causes an alert. Specify an integer from 0 through 99. To enable this alert, set the CreateAlertBaseOnPercentSuccess parameter as $True.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeBaseOn

Specifies which time zone to use:

  • LocalTime: Use local time.
  • UTC: Use Coordinated Universal Time (UTC).

Parameter properties

Type:TimeType
Default value:None
Accepted values:LocalTime, Utc
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseMeteredNetwork

Indicates whether to allow clients to download content over a metered internet connection after the deadline, which may incur extra expense.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserNotification

Specifies the type of user notification.

  • DisplayAll: Display in Software Center and show all notifications.
  • DisplaySoftwareCenterOnly: Display in Software Center, and only show notifications of computer restarts.
  • HideAll: Hide in Software Center and all notifications.

Parameter properties

Type:UserNotificationType
Default value:None
Accepted values:DisplayAll, DisplaySoftwareCenterOnly, HideAll
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject

Notes

For more information on this return object and its properties, see SMS_ApplicationAssignment server WMI class.