Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.
Examples
Example 1: Install an application
This command creates a new deployment for Visual Studio 2019 to the collection Developers Workstation. It installs the app, and is required. Both the available date and deadline are the same time in the past, so as soon as the client receives this policy, it installs the app.
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
-ApprovalRequired
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
-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:
You don't want the deployment to check for running executables.
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 this 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 this 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
Specify an optional comment for this 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:
None
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
-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
Aliases:
SupersedenceDeadlineDateTime
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DeployAction
Specify the deployment action, either to install or uninstall the application. If competing deployments target the same device, the Install action takes priority.
Parameter properties
Type:
DeployActionType
Default value:
None
Accepted values:
Install, Uninstall
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
-DeployPurpose
Specify the deployment purpose:
Available: The user sees the application in Software Center. They can install it on demand.
Required: The client automatically installs the app according to the schedule that you set. If the application isn't hidden, a user can track its deployment status. They can also use Software Center to install the application before the deadline.
Parameter properties
Type:
DeployPurposeType
Default value:
None
Accepted values:
Available, Required
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
-DisableContentDependencyDetection
Add this parameter to not automatically distribute content for dependent apps.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
DisableDetectAssociatedContentDependencies
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
-DistributeCollectionName
The site distributes content to the distribution points that are associated with this collection name.
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
-DistributeContent
Add this parameter if you need to distribute the app content first.
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
-DistributionPointGroupName
To distribute the application content, specify the name of a distribution point group.
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
-DistributionPointName
To distribute the application content, specify the name of a distribution point.
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
-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
-GenerateScomAlertOnFailure
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
Aliases:
RaiseMomAlertsOnFailure
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Id
Specify the ID of the application to deploy.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
CIId, CI_ID, ApplicationId
Parameter sets
SearchByIdMandatory
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InputObject
Specify an application object to deploy. To get this object, use the Get-CMApplication cmdlet.
Parameter properties
Type:
IResultObject
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
Application
Parameter sets
SearchByValueMandatory
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specify the name of the application to deploy.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
LocalizedDisplayName, ApplicationName
Parameter sets
SearchByNameMandatory
Position:
0
Mandatory:
True
Value from pipeline:
False
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
-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
-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
-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.
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
-UpdateSupersedence
For an available deployment, use this parameter to specify the installation deadline to upgrade users or devices that have the superseded application installed. Use DeadlineDateTime to specify a specific time, otherwise it's as soon as possible after the AvailableDateTime.
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
-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:
None
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.