Set-WmsScheduledUpdate

Sets the schedule for Windows updates and custom maintenance scripts.

Syntax

Set-WmsScheduledUpdate
   [-AutomaticUpdateMode <EAutomaticUpdateMode>]
   [-HourToScheduleUpdates <UInt32>]
   [-CustomScript <String>]
   [-MaxTimeAllowedForCustomScript <UInt32>]
   [-ReturnState <EScheduleUpdateReturnState>]
   [-Server <String>]
   [<CommonParameters>]

Description

The Set-WmsScheduledUpdate cmdlet sets the schedule for Windows updates and custom maintenance scripts for a computer running MultiPoint Server with disk protection enabled and configured for discard mode.

Examples

Example 1: Enable Windows updates on MultiPoint Server

PS C:\> Set-WmsScheduledUpdate -AutomaticUpdateMode WindowsOnly -HourToScheduleUpdates 2 -ReturnState PreviousState

This command configures the local MultiPoint Server to check for available Windows updates at 2:00 AM, apply the updates, and return the computer to the power state it was in before updates were applied. To update the MultiPoint Server, the command performs these operations:

  • Restart the computer to disable disk protection.
  • Apply pending Windows updates.
  • Restart the computer to enable disk protection and to return it to the previous power state.

Parameters

-AutomaticUpdateMode

Specifies the type of automatic updates to process. The acceptable values for this parameter are:

  • None
  • WindowsOnly
  • WindowsAndOtherPrograms
Type:EAutomaticUpdateMode
Accepted values:None, WindowsOnly, WindowsAndOtherPrograms
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-CustomScript

Specifies the full path of a user-supplied command to run at update time.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-HourToScheduleUpdates

Specifies the hour at which to run automatic updates. The acceptable values for this parameter are: 0-23.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-MaxTimeAllowedForCustomScript

Specifies the maximum amount of time that the custom script is allowed to run. After this amount of time expires, the process is stopped and the system is restarted to re-enable disk protection.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ReturnState

Specifies the state in which to place the computer after updates are complete. The acceptable values for this parameter are: Shutdown and PreviousState.

Type:EScheduleUpdateReturnState
Accepted values:Shutdown, PreviousState
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Server

Specifies the fully qualified host name of the MultiPoint Server that is the target of the command. The default is localhost.

Type:String
Aliases:ComputerName
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

Nullable<T>[[Microsoft.WindowsServerSolutions.MultipointServer.PowerShell.Commands.Library.EAutomaticUpdateMode, MultiPoint, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

Nullable<T>[[System.UInt32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

String

Nullable<T>[[Microsoft.WindowsServerSolutions.MultipointServer.PowerShell.Commands.Library.EScheduleUpdateReturnState, MultiPoint, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

Outputs

Microsoft.WindowsServerSolutions.MultipointServer.PowerShell.Commands.Library.WmsScheduledUpdate