shutdown privilege?

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

Guest

why can't a normal user use the command " shutdown -r " to restart the
computer, even if it has the power user privilege?
is this command only used for administrator user?
 
i have not played with the cli version of shutdown asa non admin in a long
time.

but it makes sense, because you are really do remote shutdown with the cli i
think. basically u r saying

"shutdown ."

now i think remote shutdown is a group policy setting. but have not looked
in some time.
 
Check to see if the users group or the user are included in the user right
for shut down the system in Local Security Policy under local policies/user
rights. --- Steve
 
it's not remote shutdown.
i created a user account with limited privilege.
it can shutdown this computer via Start->Shutdown, but can't be done by
using command.
 
i aggree with steve check group policy.

i was thinking the cli was more like script

were in "." is an automated representation of \\localcomputername

like this:
' anybody can run this is think
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & _
strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Reboot()
Next


'but only admins can run this
strComputer = "."
Set objWMIService = GetObject_
("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" & _
strComputer & "\root\cimv2")

Set colOperating Systems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Win32Shutdown(1)
Next

but i am wrong alot so
 
where can i set up it?

Steven L Umbach said:
Check to see if the users group or the user are included in the user right
for shut down the system in Local Security Policy under local policies/user
rights. --- Steve
 
If they can do it via normal means but not from the command line then it
probably is not a user right problem but to check open Local Security Policy
and go to local policies/user rights to see what groups/users are included
in the user right for shut down the system and you can change that if
needed. I would also try PsShutdown from SysInternals if shutdown will not
work. --- Steve

http://www.sysinternals.com/Utilities/PsShutdown.html -- PsShutdown
 
Back
Top