Mon, Oct 27 2008 19:50
get-powershellblog
Command Shell: Set-MaintenanceWindow with an end time of now
Reported on MS Connect
HERE.
I view this more as an issue. Please vote if you come across this problem by following the link above. There is a bit more information if you follow the link also.
Summary:
----------------------
When a maintenance window has been created, if "Set-MaintenanceWindow -endtime $(get-date)" is used, it will output an error:
-------------------------------
Set-MaintenanceWindow : Cannot set scheduled end time to a time in the past
-------------------------------
There seems to be a small delay in processing the command, simply doing this works:
Set-MaintenanceWindow -endtime $(get-date).addseconds(1)
The cmdlet should gracefully accept a end time of "now".
----------------------
Read the complete post at http://marcoshaw.blogspot.com/2008/10/command-shell-set-maintenancewindow.html
Filed under: command shell, operations manager, opsmgr, feedback, sp1