Shutdown/Restart script

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

does someone have a script to keep user from sutting down or restarting thier
systems?
 
does someone have a script to keep user from sutting down or restarting thier
systems?

Just deny them the right to shutdown the system.

Use tip 6705 in the 'Tips & Tricks' at http://www.jsifaq.com to download NTRights.exe


@echo off
for /f "Skip=1 Tokens=*" %%a in ('netdom query WORKSTATION^|find /V /I "The command completed successfully."') do (
for /f "Tokens=1" %%c in ('@echo %%a') do (
ntrights -r SeShutdownPrivilege -u "Users" -m \\%%c
)
)
 
Back
Top