Set-CMOperatingSystemImageUpdateSchedule
Set-CMOperatingSystemImageUpdateSchedule
Sets a schedule for an operating system image update in System Center 2012 Configuration Manager.
Syntax
Parameter Set: SetScheduleById
Set-CMOperatingSystemImageUpdateSchedule -Id <String> -SoftwareUpdate <IResultObject[]> [-ContinueOnError <Boolean> ] [-CustomSchedule <DateTime> ] [-UpdateDistributionPointsWithImage <Boolean> ] [-Utc <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetScheduleByIdRunNow
Set-CMOperatingSystemImageUpdateSchedule -Id <String> -SoftwareUpdate <IResultObject[]> [-ContinueOnError <Boolean> ] [-RunNow] [-UpdateDistributionPointsWithImage <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetScheduleByInputObject
Set-CMOperatingSystemImageUpdateSchedule -InputObject <IResultObject> -SoftwareUpdate <IResultObject[]> [-ContinueOnError <Boolean> ] [-CustomSchedule <DateTime> ] [-UpdateDistributionPointsWithImage <Boolean> ] [-Utc <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetScheduleByInputObjectRunNow
Set-CMOperatingSystemImageUpdateSchedule -InputObject <IResultObject> -SoftwareUpdate <IResultObject[]> [-ContinueOnError <Boolean> ] [-RunNow] [-UpdateDistributionPointsWithImage <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetScheduleByName
Set-CMOperatingSystemImageUpdateSchedule -Name <String> -SoftwareUpdate <IResultObject[]> [-ContinueOnError <Boolean> ] [-CustomSchedule <DateTime> ] [-UpdateDistributionPointsWithImage <Boolean> ] [-Utc <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetScheduleByNameRunNow
Set-CMOperatingSystemImageUpdateSchedule -Name <String> -SoftwareUpdate <IResultObject[]> [-ContinueOnError <Boolean> ] [-RunNow] [-UpdateDistributionPointsWithImage <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-CMOperatingSystemImageUpdateSchedule cmdlet sets a schedule for updating an operating system image in Microsoft System Center 2012 SP1 Configuration Manager.
Parameters
-ContinueOnError<Boolean>
Indicates whether the update process continues if it encounters an error.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-CustomSchedule<DateTime>
Specifies a date time value, in D.HH:MM:SS format, for a custom schedule.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Id<String>
Specifies an identifier of an operating system image update schedule in Configuration Manager.
Aliases |
PackageId |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject>
Specifies an input object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of an operating system image update schedule in Configuration Manager.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-RunNow
Indicates that the schedule is set by ID, input object, or name, and run now.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SoftwareUpdate<IResultObject[]>
Specifies an array of input objects.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-UpdateDistributionPointsWithImage<Boolean>
Indicates whether to update distribution points with the image.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Utc<Boolean>
Indicates whether to use Coordinated Universal Time (UTC).
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 an update schedule
The first command uses the Get-CMSoftwareUpdate cmdlet to get the software update associated with the ID 308. The command stores the result in the $SoftwareUpdate variable.
The second command uses the Set-CMOperatingSystemImageUpdateSchedule cmdlet to set the schedule the update to run now.
PS C:\> $SoftwareUpdate = Get-CMSoftwareUpdate -Id "308"
PS C:\> Set-CMOperatingSystemImageUpdateSchedule -SoftwareUpdate $SoftwareUpdate -Name "Microsoft Windows 8 (x86)" -RunNow -ContinueOnError $True -UpdateDistributionPointsWithImage $True
Example 2: Set a custom update schedule
The first command uses the Get-CMSoftwareUpdate cmdlet to get the software updated associated with the ID 308. The command stores the value in the $SoftwareUpdate variable.
The second command sets the update schedule and specifies a date time to run the update. The command also specifies UTC time.
PS C:\> $SoftwareUpdate = Get-CMSoftwareUpdate -Id "308"
PS C:\> Set-CMOperatingSystemImageUpdateSchedule -SoftwareUpdate $SoftwareUpdate -Name "Microsoft Windows 8 (x86)" -CustomSchedule "2012/11/17 10:00:00" -Utc $True