03 Ocak 2008 Perşembe

Schedule a machine into maintenance mode

The following code can be used to schedule a machine into maintenance mode.
Note: Machines cannot be scheduled into maintenance mode in the future so for example, adding a machine into maintenance mode at 10pm, the script should launch at 9:55pm and the maintenance mode should be scheduled to start at 9:50pm (in the past).

$computer = Get-Agent where {$_.Name -like ‘computer*’} $computer.HostComputer New-MaintenanceWindow -StartTime: ‘5/22/2007 00:30’ -EndTime: ‘5/22/2007 12:30’ -Comment: "Install security patch"

0 yorum: