Search code examples
c#windowspowershellbatch-fileshutdown

How to hide Shut Down and Log Off through commandline(script) without reboot


How to hide Shut Down and Log Off buttons in Windows 7 through commandline(script) without reboot.

I've googled how it can be done through gpedit.msc http://www.thewindowsclub.com/prevent-users-shutting-down-restarting-windows-computer

Method with ntrights.exe wont work.

I'll glad to any solutions batch, powershell, c# etc.


Solution

  • GPUpdate /force
    

    Although it will happen every hour automatically.