Set-CMPackageDeployment

Set-CMPackageDeployment

Changes values that define how Configuration Manager deploys a software package.

Syntax

Parameter Set: SetDeviceProgramDeploymentByPackageId
Set-CMPackageDeployment -CollectionName <String> -DeviceProgramName <String> -PackageId <String> [-Comment <String> ] [-DeploymentStartDay <DateTime> ] [-DeploymentStartTime <DateTime> ] [-RecurUnit <RecurUnitType> {Days | Hours | Minutes} ] [-RecurValue <Int32> ] [-Rerun <Boolean> ] [-UseMeteredNetwork <Boolean> ] [-UseRecurrencePattern <Boolean> ] [-UseUtc <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetDeviceProgramDeploymentByPackageName
Set-CMPackageDeployment -CollectionName <String> -DeviceProgramName <String> -PackageName <String> [-Comment <String> ] [-DeploymentStartDay <DateTime> ] [-DeploymentStartTime <DateTime> ] [-RecurUnit <RecurUnitType> {Days | Hours | Minutes} ] [-RecurValue <Int32> ] [-Rerun <Boolean> ] [-UseMeteredNetwork <Boolean> ] [-UseRecurrencePattern <Boolean> ] [-UseUtc <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetDeviceProgramDeploymentByPackageValue
Set-CMPackageDeployment -CollectionName <String> -Comment <String> -DeviceProgramName <String> -Package <IResultObject> [-DeploymentStartDay <DateTime> ] [-DeploymentStartTime <DateTime> ] [-RecurUnit <RecurUnitType> {Days | Hours | Minutes} ] [-RecurValue <Int32> ] [-Rerun <Boolean> ] [-UseMeteredNetwork <Boolean> ] [-UseRecurrencePattern <Boolean> ] [-UseUtc <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetStandardProgramDeploymentByPackageId
Set-CMPackageDeployment -CollectionName <String> -PackageId <String> -StandardProgramName <String> [-AllowSharedContent <Boolean> ] [-AllowUsersRunIndependently <Boolean> ] [-Comment <String> ] [-DeploymentAvailableDay <DateTime> ] [-DeploymentAvailableTime <DateTime> ] [-DeploymentExpireDay <DateTime> ] [-DeploymentExpireTime <DateTime> ] [-EnableExpireSchedule <Boolean> ] [-FastNetworkOption <FastNetworkOptionType> {DownloadContentFromDistributionPointAndRunLocally | RunProgramFromDistributionPoint} ] [-PersistOnWriteFilterDevice <Boolean> ] [-RerunBehavior <RerunBehaviorType> {AlwaysRerunProgram | NeverRerunDeployedProgram | RerunIfFailedPreviousAttempt | RerunIfSucceededOnPreviousAttempt} ] [-Schedule <IResultObject[]> ] [-ScheduleEvent {AsSoonAsPossible | LogOff | LogOn}[] ] [-SendWakeUpPacket <Boolean> ] [-SlowNetworkOption <SlowNetworkOptionType> {DoNotRunProgram | DownloadContentFromDistributionPointAndLocally | RunProgramFromDistributionPoint} ] [-SoftwareInstallation <Boolean> ] [-SystemRestart <Boolean> ] [-UseMeteredNetwork <Boolean> ] [-UseUtcForAvailableSchedule <Boolean> ] [-UseUtcForExpireSchedule <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetStandardProgramDeploymentByPackageName
Set-CMPackageDeployment -CollectionName <String> -PackageName <String> -StandardProgramName <String> [-AllowSharedContent <Boolean> ] [-AllowUsersRunIndependently <Boolean> ] [-Comment <String> ] [-DeploymentAvailableDay <DateTime> ] [-DeploymentAvailableTime <DateTime> ] [-DeploymentExpireDay <DateTime> ] [-DeploymentExpireTime <DateTime> ] [-EnableExpireSchedule <Boolean> ] [-FastNetworkOption <FastNetworkOptionType> {DownloadContentFromDistributionPointAndRunLocally | RunProgramFromDistributionPoint} ] [-PersistOnWriteFilterDevice <Boolean> ] [-RerunBehavior <RerunBehaviorType> {AlwaysRerunProgram | NeverRerunDeployedProgram | RerunIfFailedPreviousAttempt | RerunIfSucceededOnPreviousAttempt} ] [-Schedule <IResultObject[]> ] [-ScheduleEvent {AsSoonAsPossible | LogOff | LogOn}[] ] [-SendWakeUpPacket <Boolean> ] [-SlowNetworkOption <SlowNetworkOptionType> {DoNotRunProgram | DownloadContentFromDistributionPointAndLocally | RunProgramFromDistributionPoint} ] [-SoftwareInstallation <Boolean> ] [-SystemRestart <Boolean> ] [-UseMeteredNetwork <Boolean> ] [-UseUtcForAvailableSchedule <Boolean> ] [-UseUtcForExpireSchedule <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetStandardProgramDeploymentByPackageValue
Set-CMPackageDeployment -CollectionName <String> -Package <IResultObject> -StandardProgramName <String> [-AllowSharedContent <Boolean> ] [-AllowUsersRunIndependently <Boolean> ] [-Comment <String> ] [-DeploymentAvailableDay <DateTime> ] [-DeploymentAvailableTime <DateTime> ] [-DeploymentExpireDay <DateTime> ] [-DeploymentExpireTime <DateTime> ] [-EnableExpireSchedule <Boolean> ] [-FastNetworkOption <FastNetworkOptionType> {DownloadContentFromDistributionPointAndRunLocally | RunProgramFromDistributionPoint} ] [-PersistOnWriteFilterDevice <Boolean> ] [-RerunBehavior <RerunBehaviorType> {AlwaysRerunProgram | NeverRerunDeployedProgram | RerunIfFailedPreviousAttempt | RerunIfSucceededOnPreviousAttempt} ] [-Schedule <IResultObject[]> ] [-ScheduleEvent {AsSoonAsPossible | LogOff | LogOn}[] ] [-SendWakeUpPacket <Boolean> ] [-SlowNetworkOption <SlowNetworkOptionType> {DoNotRunProgram | DownloadContentFromDistributionPointAndLocally | RunProgramFromDistributionPoint} ] [-SoftwareInstallation <Boolean> ] [-SystemRestart <Boolean> ] [-UseMeteredNetwork <Boolean> ] [-UseUtcForAvailableSchedule <Boolean> ] [-UseUtcForExpireSchedule <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-CMPackageDeployment cmdlet changes values that define how Microsoft System Center 2012 Configuration Manager deploys a software package. A deployment includes a collection of devices or users, a package to deploy, and either a device program name or a standard program name. To specify which deployment to modify, specify the collection name, package, and program name. You can specify the package by name or ID, or you can use the Get-CMPackage cmdlet to get a package object.

Parameters

-AllowSharedContent<Boolean>

Indicates whether clients use shared content. If this value is $True, clients attempt to download content from other clients that downloaded that content. If this value is $False, clients do not attempt to download from other clients.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AllowUsersRunIndependently<Boolean>

Indicates whether uses can install the software independently. If this value is $True, users can install software in this package from the software library regardless of the scheduled installation time. If this value is $False, the software installs at the scheduled time.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CollectionName<String>

Specifies the ID of a device or user collection.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Comment<String>

Specifies a comment for the deployment.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentAvailableDay<DateTime>

Specifies a day as a DateTime object. This is the day on which the deployment becomes available. If you specify a value for the DeployAvailableTime parameter in addition to this parameter, the cmdlet uses that value.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentAvailableTime<DateTime>

Specifies a time as a DateTime object. This is the time at which the deployment becomes available.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentExpireDay<DateTime>

Specifies a day as a DateTime object. This is the day on which the deployment expires. If you specify a value for the DeploymentExpireTime parameter in addition to this parameter, the cmdlet uses that value.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentExpireTime<DateTime>

Specifies a time as a DateTime object. This is the time at which the deployment expires.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentStartDay<DateTime>

Specifies a day as a DateTime object. This is the day on which the deployment starts. If you specify a value for the DeploymentStartTime parameter in addition to this parameter, the cmdlet uses that value.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentStartTime<DateTime>

Specifies a time as a DateTime object. This is the time at which the deployment starts.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeviceProgramName<String>

Specifies the name of a device program.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnableExpireSchedule<Boolean>

Indicates whether to enable the schedule to expire the deployment.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FastNetworkOption<FastNetworkOptionType>

Specifies client behavior on a fast network. Acceptable values for this parameter are:

-- DownloadContentFromDistributionPointAndRunLocally
-- RunProgramFromDistributionPoint

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Package<IResultObject>

Specifies a package object. To obtain a package object, use the Get-CMPackage cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PackageId<String>

Specifies the ID of a package.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PackageName<String>

Specifies the name of a package.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PersistOnWriteFilterDevice<Boolean>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RecurUnit<RecurUnitType>

Specifies a unit for a recurring deployment. Acceptable values for this parameter are:

-- Days
-- Hours
-- Minutes

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RecurValue<Int32>

Specifies how often a deployment recurs. This parameter depends on the unit type specified in the RecurUnit parameter. This value can be between 1 and 23 if the unit is Hours, between 1 and 31 if the unit is Days, or between 1 and 59 if the unit is Minutes.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Rerun<Boolean>

Indicates whether the deployment reruns. If this value is $True, the deployment runs again for clients as specified in the RerunBehavior parameter. If this value is $False, the deployment does not run again.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RerunBehavior<RerunBehaviorType>

Specifies how a deployment reruns on a client. Acceptable values for this parameter are:

-- AlwaysRetunProgram. Rerun as scheduled, even if the deployment succeeded. You can use this value for recurring deployments.
-- NeverRerunDeployedProgram. Does not rerun, even if the deployment failed or files changed.
-- RerunIfFailedPreviousAttempt. Rerun, as scheduled, if the deployment failed on the previous attempt.
-- RerunIfSucceededOnpreviousAttempt. Rerun only if the previous attempt succeeded. You can use this value for updates that depend on the previous update.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Schedule<IResultObject[]>

Specifies a schedule object for the deployment.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ScheduleEvent<ScheduleEventType[]>

Specifies an array of schedule event types. Acceptable values for this parameter are:

-- AsSoonAsPossible
-- LogOff
-- LogOn
-- SendWakeUpPacket

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SendWakeUpPacket<Boolean>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SlowNetworkOption<SlowNetworkOptionType>

Specifies how Configuration Manager deploys this package in a slow network. Acceptable values for this parameter are:

-- DoNotRunProgram
-- DownloadContentFromDistributionPointAndLocally
-- RunProgramFromDistributionPoint

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SoftwareInstallation<Boolean>

Indicates whether to install the deployed software outside of maintenance windows. A maintenance window is a specified period of time used for computer maintenance and updates. If this value is $True, the Configuration Manager installs software according to schedule, even if the schedule falls outside a maintenance window. If this value is $False, Configuration Manager does not install deployed software outside any windows, but waits for a maintenance window.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StandardProgramName<String>

Specifies a standard program name.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SystemRestart<Boolean>

Indicates whether a system 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 does not restart outside a maintenance window.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseMeteredNetwork<Boolean>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseRecurrencePattern<Boolean>

Indicates whether to use a recurrence pattern.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseUtc<Boolean>

Indicates whether to use UTC (Coordinated Universal Time), also known as Greenwich Mean Time. If this value is $True, Configuration Manager uses UTC for this deployment. If this value is $False, Configuration Manager uses local time.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseUtcForAvailableSchedule<Boolean>

Indicates whether to use UTC for available schedule. If this value is $True, Configuration Manager uses UTC. If this value is $False, Configuration Manager uses local time.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseUtcForExpireSchedule<Boolean>

Indicates whether to use UTC for expire schedule. If this value is $True, Configuration Manager uses UTC. If this value is $False, Configuration Manager uses local time.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Set recurrence properties

This command makes changes to the deployment specified by the collection named All Systems, the device program named DPM, and the package named User State Migration Tool for Windows 8. The command sets the UseRecurrencePattern parameter to a value of $True. The command specifies a recur unit of Hours and a recur value of seven, therefore the deployment recurs every seven hours.

PS C:\> Set-CMPackageDeployment -CollectionName "All Systems" -DeviceProgramName "DPM" -PackageName "User State Migration Tool for Windows 8" -RecurUnit Hours -RecurValue 7 -UseRecurrencePattern $True

Example 2: Set availability day and time

This command makes changes to the deployment specified by the collection named All Systems, the package named User State Migration Tool for Windows 8, and the standard program named SPM. The command specifies a day and time when the deployment becomes available. The command also specifies that the deployment does not use UTC for the availability schedule. The schedule refers to the local time zone.

PS C:\> Set-CMPackageDeployment -CollectionName "All Systems" -PackageName "User State Migration Tool for Windows 8" -StandardProgramName "SPM" -DeploymentAvailableDay 2012/10/18 -DeploymentAvailableTime 15:41 -UseUtcForAvailableSchedule $False

Start-CMPackageDeployment

Get-CMPackage