I've recently started using psshutdown to switch off groups of computers at the end of the day. But I'd prefer not to shut down any computers that are logged in. Methinks a bit of scripting with psloggedon will be necessary. Anyone set things up like this...?
Some kind edugeeker wrote this batch file:
I call it as a startup script from GPO to ensure computers are shutdown at 23:15
at | find "shutdown.exe" > c:\atlist.txt
for /F "tokens=1" %%a in (c:\atlist.txt) do at %%a /delete
at 23:15 /every:m,t,w,th,f,s,su %SystemRoot%\system32\shutdown.exe -s -t 0 -f
Shutdownertron, whilst it isn't user-aware, does allow a user to override it so that they can carry on uninterrupted, and has a variable delay on it.
Thanks for the replies. Does that script avoid computers that are logged in, while shutting down ones that are logged out...? If so, how does it work...?