Hi,
I would like to do the following:
1.Send a message to a remote server that people should logoff
This message should appear every minute till a certain hour, f.e. 5:30 PM
Something like
While($True)
{
msg * /server:servername "This server will go in maintenance . Please logoff.
Start-Sleep -s 10
}
2.Last 5 minutes, server should come in drain mode
Enter server is drain mode
chglogon /drainuntilrestart
3.When it is 5:30 people should be logged off
Something like
Get-TSsession -computername servername -username users | stop-tssession -force
(4.send a message to a user that server is in drainmode)
Please advise.
J.
Jan Hoedt