Edit

Share via


New-CMAutoDeploymentRuleDeployment

Create a deployment for an automatic deployment rule.

Syntax

ByName (Default)

New-CMAutoDeploymentRuleDeployment
    [-Name] <String>
    [-AlertTime <Int32>]
    [-AlertTimeUnit <TimeUnitType>]
    [-AllowDownloadFromMicrosoftUpdate <Boolean>]
    [-AllowRestart <Boolean>]
    [-AllowSoftwareInstallationOutsideMaintenanceWindow <Boolean>]
    [-AllowUseMeteredNetwork <Boolean>]
    [-AvailableImmediately <Boolean>]
    [-AvailableTime <Int32>]
    [-AvailableTimeUnit <TimeUnitType>]
    [-Collection <IResultObject>]
    [-CollectionId <String>]
    [-CollectionName <String>]
    [-DeadlineImmediately <Boolean>]
    [-DeadlineTime <Int32>]
    [-DeadlineTimeUnit <TimeUnitType>]
    [-DisableOperationsManager <Boolean>]
    [-EnableDeployment <Boolean>]
    [-GenerateOperationsManagerAlert <Boolean>]
    [-GenerateSuccessAlert <Boolean>]
    [-NoInstallOnRemote <Boolean>]
    [-NoInstallOnUnprotected <Boolean>]
    [-RequirePostRebootFullScan <Boolean>]
    [-SendWakeupPacket <Boolean>]
    [-SoftDeadlineEnabled <Boolean>]
    [-SuccessPercentage <Int32>]
    [-SuppressRestartServer <Boolean>]
    [-SuppressRestartWorkstation <Boolean>]
    [-UseBranchCache <Boolean>]
    [-UserNotification <UserNotificationOption>]
    [-UseUtc <Boolean>]
    [-VerboseLevel <VerboseLevelType>]
    [-WriteFilterHandling <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ById

New-CMAutoDeploymentRuleDeployment
    [-Id] <Int32>
    [-AlertTime <Int32>]
    [-AlertTimeUnit <TimeUnitType>]
    [-AllowDownloadFromMicrosoftUpdate <Boolean>]
    [-AllowRestart <Boolean>]
    [-AllowSoftwareInstallationOutsideMaintenanceWindow <Boolean>]
    [-AllowUseMeteredNetwork <Boolean>]
    [-AvailableImmediately <Boolean>]
    [-AvailableTime <Int32>]
    [-AvailableTimeUnit <TimeUnitType>]
    [-Collection <IResultObject>]
    [-CollectionId <String>]
    [-CollectionName <String>]
    [-DeadlineImmediately <Boolean>]
    [-DeadlineTime <Int32>]
    [-DeadlineTimeUnit <TimeUnitType>]
    [-DisableOperationsManager <Boolean>]
    [-EnableDeployment <Boolean>]
    [-GenerateOperationsManagerAlert <Boolean>]
    [-GenerateSuccessAlert <Boolean>]
    [-NoInstallOnRemote <Boolean>]
    [-NoInstallOnUnprotected <Boolean>]
    [-RequirePostRebootFullScan <Boolean>]
    [-SendWakeupPacket <Boolean>]
    [-SoftDeadlineEnabled <Boolean>]
    [-SuccessPercentage <Int32>]
    [-SuppressRestartServer <Boolean>]
    [-SuppressRestartWorkstation <Boolean>]
    [-UseBranchCache <Boolean>]
    [-UserNotification <UserNotificationOption>]
    [-UseUtc <Boolean>]
    [-VerboseLevel <VerboseLevelType>]
    [-WriteFilterHandling <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByValue

New-CMAutoDeploymentRuleDeployment
    [-InputObject] <IResultObject>
    [-AlertTime <Int32>]
    [-AlertTimeUnit <TimeUnitType>]
    [-AllowDownloadFromMicrosoftUpdate <Boolean>]
    [-AllowRestart <Boolean>]
    [-AllowSoftwareInstallationOutsideMaintenanceWindow <Boolean>]
    [-AllowUseMeteredNetwork <Boolean>]
    [-AvailableImmediately <Boolean>]
    [-AvailableTime <Int32>]
    [-AvailableTimeUnit <TimeUnitType>]
    [-Collection <IResultObject>]
    [-CollectionId <String>]
    [-CollectionName <String>]
    [-DeadlineImmediately <Boolean>]
    [-DeadlineTime <Int32>]
    [-DeadlineTimeUnit <TimeUnitType>]
    [-DisableOperationsManager <Boolean>]
    [-EnableDeployment <Boolean>]
    [-GenerateOperationsManagerAlert <Boolean>]
    [-GenerateSuccessAlert <Boolean>]
    [-NoInstallOnRemote <Boolean>]
    [-NoInstallOnUnprotected <Boolean>]
    [-RequirePostRebootFullScan <Boolean>]
    [-SendWakeupPacket <Boolean>]
    [-SoftDeadlineEnabled <Boolean>]
    [-SuccessPercentage <Int32>]
    [-SuppressRestartServer <Boolean>]
    [-SuppressRestartWorkstation <Boolean>]
    [-UseBranchCache <Boolean>]
    [-UserNotification <UserNotificationOption>]
    [-UseUtc <Boolean>]
    [-VerboseLevel <VerboseLevelType>]
    [-WriteFilterHandling <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-CMAutoDeploymentRuleDeployment cmdlet creates a deployment for an automatic deployment rule (ADR).

Note

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

Examples

Example 1: Create a deployment for an automatic deployment rule by name

This command creates a deployment for the automatic deployment rule TestDepRule01 and the All Systems collection.

New-CMAutoDeploymentRuleDeployment -Name "TestDepRule01" -CollectionName "All Systems" -EnableDeployment $true -SendWakeupPacket $false -VerboseLevel OnlySuccessAndErrorMessages -UseUtc $false  -AvailableTime 7 -AvailableTimeUnit Days -DeadlineTime 7 -DeadlineTimeUnit Days -UserNotification DisplaySoftwareCenterOnly -AllowSoftwareInstallationOutsideMaintenanceWindow $false -AllowRestart $false -SuppressRestartServer  $false -SuppressRestartWorkstation $false -WriteFilterHandling $false -GenerateSuccessAlert $true -SuccessPercentage 10 -AlertTime 7 -AlertTimeUnit Days -DisableOperationsManager $false -GenerateOperationsManagerAlert $false -NoInstallOnRemote $false -NoInstallOnUnprotected $false -UseBranchCache $false

Example 2: Create a deployment for an automatic deployment rule by object

This command gets the automatic deployment rule object named TestDepRule02. It then uses the pipeline operator to pass the object to New-CMAutoDeploymentRuleDeployment, which creates a deployment for automatic deployment rule TestDepRule02 and the All Systems collection.

Get-CMAutoDeploymentRule -Name "TestDepRule02" | New-CMAutoDeploymentRuleDeployment -CollectionName "All Systems" -EnableDeployment $true -SendWakeupPacket $false -VerboseLevel OnlySuccessAndErrorMessages -UseUtc $false -AvailableTime 7 -AvailableTimeUnit Days -DeadlineTime 7 -DeadlineTimeUnit Days -UserNotification DisplaySoftwareCenterOnly -AllowSoftwareInstallationOutsideMaintenanceWindow $false -AllowRestart $false -SuppressRestartServer $false -SuppressRestartWorkstation $false -WriteFilterHandling $false -GenerateSuccessAlert  $true -SuccessPercentage 10 -AlertTime 7 -AlertTimeUnit Days -DisableOperationsManager $false -GenerateOperationsManagerAlert $false -NoInstallOnRemote $false -NoInstallOnUnprotected $false -UseBranchCache $false

Parameters

-AlertTime

Specifies the number of time units for the offset from the deadline.

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

-AlertTimeUnit

Specifies the time unit type for the offset from the deadline.

Parameter properties

Type:TimeUnitType
Default value:None
Accepted values:Hours, Days, Weeks, Months
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

-AllowDownloadFromMicrosoftUpdate

Use this parameter to set the following option on the Download Settings page of the ADR deployment settings: If software updates are not available on distribution point in current, neighbor or site boundary groups, download content from Microsoft Updates.

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

-AllowRestart

Indicates whether a system restart is allowed to be performed outside of any defined maintenance windows when the installation deadline is reached.

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

-AllowSoftwareInstallationOutsideMaintenanceWindow

Indicates whether software installation is allowed to be performed outside of any defined maintenance windows when the installation deadline is reached.

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

-AllowUseMeteredNetwork

Use this parameter to set the following option on the Download Settings page of the ADR deployment settings: Allow clients on a metered Internet connection to download content after the installation deadline, which might incur additionl costs

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

-AvailableImmediately

Indicates whether software updates are available to install as soon as possible after the rule is run.

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

-AvailableTime

Specifies the number of time units for the software available time.

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

-AvailableTimeUnit

Specifies the time unit type for the software available time.

Parameter properties

Type:TimeUnitType
Default value:None
Accepted values:Hours, Days, Weeks, Months
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

Specifies a target collection object for the software update deployment. To obtain a collection 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

Specifies the ID of the target collection for the software update 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

-CollectionName

Specifies the name of the target collection for the software update 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

-DeadlineImmediately

Indicates whether required software updates are installed as soon as possible when the deadline is reached.

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

-DeadlineTime

Specifies the number of time units for the deadline.

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

-DeadlineTimeUnit

Specifies the time unit type for the deadline.

Parameter properties

Type:TimeUnitType
Default value:None
Accepted values:Hours, Days, Weeks, Months
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

-DisableOperationsManager

Indicates whether Operations Manager alerts are disabled while software updates run.

Parameter properties

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

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

-EnableDeployment

Indicates whether to enable the deployment after this rule runs for the associated software group. If set to $False, manually deploy the software update group.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Enable, EnabledAfterCreate, EnableAfterCreate

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

-GenerateOperationsManagerAlert

Indicates whether Operations Manager alerts are generated when a software update installation fails.

Parameter properties

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

Parameter sets

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

-GenerateSuccessAlert

Indicates whether an alert is generated when this rule runs successfully.

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

-Id

Specifies the ID of the automatic deployment rule to add this deployment to.

Parameter properties

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

Parameter sets

ById
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies an automatic deployment rule object to add this deployment to. To obtain an automatic deployment rule object, use the Get-CMSoftwareUpdateAutoDeploymentRule cmdlet.

Parameter properties

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

Parameter sets

ByValue
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the automatic deployment rule to add this deployment to.

Parameter properties

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

Parameter sets

ByName
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NoInstallOnRemote

Indicates whether to install software updates when the updates are not available on any remote distribution points.

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

-NoInstallOnUnprotected

Indicates whether to install software updates when the updates are not available on any unprotected distribution points.

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

-RequirePostRebootFullScan

Use this parameter to set the following option on the User Experience page of the ADR deployment settings: If any update in this deployment requires a system restart, run updates deployment evaluation cycle after restart.

Parameter properties

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

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 use Wake-on-LAN to wake up clients for required deployments.

Parameter properties

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

Parameter sets

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

-SoftDeadlineEnabled

Use this parameter to set the following option on the Deployment Schedule page of the ADR deployment settings: Delay enforcement of this deployment according to user preferences, up to the grace period defined in client settings.

Parameter properties

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

Parameter sets

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

-SuccessPercentage

Specifies the percent as an integer of client compliance. When client compliance falls below this percentage, an alert is generated.

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

-SuppressRestartServer

Indicates whether a system restart is suppressed on servers when a software update requires a system restart to complete the installation process.

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

-SuppressRestartWorkstation

Indicates whether a system restart is suppressed on workstations when a software update requires a system restart to complete the installation process.

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

-UseBranchCache

Indicates whether clients are allowed to share content with other clients on the same subnet.

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 notification behavior of the user visual experience.

Parameter properties

Type:UserNotificationOption
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

-UseUtc

Indicates whether the schedule for this deployment is evaluated based upon Universal Coordinated Time (UTC).

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

-VerboseLevel

Specifies how much state detail the clients report back for deployments created by this rule.

Parameter properties

Type:VerboseLevelType
Default value:None
Accepted values:OnlyErrorMessages, OnlySuccessAndErrorMessages, AllMessages
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

-WriteFilterHandling

Indicates whether changes are committed at deadline or during a maintenance window (requires restarts). If set to $False, content is applied on the overlay and committed 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

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