1

I have an a Windows 2016 VM on Azure that several users are RDPing into. The users are complaining that the VM shuts down at random times. When I check the logs, it shows that the shutdown has been initiated by the user! I would like to remove the option of shutting down the VM after RDPing into (remove the shutdown button). How can I achieve this?

0

To remove the shutdown command, you can connect to the template VM and execute the below PowerShell script.

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "HidePowerOptions" -Value 1 -Force

Or, you can choose to follow these manual steps using the template VM:

1.Press the Windows key, type gpedit, then select Edit group policy (Control panel).

2.Go to Computer Configuration > Administrative Templates > Start Menu and Taskbar.

3.Right-click Remove and prevent access to the Shut Down, Restart, Sleep, and Hibernate commands, and click Edit.

4.Select the Enabled setting and then click OK:

5.Notice that the shutdown command no longer appears under Windows Start menu; only the Disconnect command appears.

Please refer link for detailed information :

https://docs.microsoft.com/en-us/azure/lab-services/how-to-windows-shutdown#:~:text=Press%20the%20Windows%20key%2C%20type,Hibernate%20commands%2C%20and%20click%20Edit.

1
  • IMHO, there are 2 ways, Configuration > Administrative Templates > Start Menu and Taskbar > Remove and Prevent Access to the shutdown command. - this is the first, but does not prevent the using a command; the Second is,Computer Configuration > Windows Settings> Security Settings\Local Policies\User Rights Assignment\Shut down the system. This will defenitly even most advanced users prevent them from shutting it downhopefully – djdomi Jun 16 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.