Running Windows 10 Professional prior to the April 2017 "Creators Update" I could use the "stop-computer" PowerShell cmdlet to shutdown my computer. For me this was just sometimes faster than clicking through the GUI shutdown method, but also - I would shutdown the computer after running batch PowerShell scripts.
Since applying the update, the cmdlet no longer works and reports the error...
PS C:\WINDOWS\system32> stop-computer stop-computer : Privilege not held. At line:1 char:1 + stop-computer + ~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (MYCOMPUTER:String) [Stop-Computer], ManagementException + FullyQualifiedErrorId : StopComputerException,Microsoft.PowerShell.Commands.StopComputerCommand
This error is the same whether PowerShell is run as a normal user or as "administrator". Any ideas on what the problem could be?
Hi Noel Fairclough,
I have reproduced the issue on my side. I will submit the issue with the internal tool. You could use the "Feedback" hub to submit the issue. As a workaround, we could use the "shutdown" command.
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact email@example.com.
This is documented here.
Thanks, Darrell Gorter [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
- Proposed as answer by MeipoXuMicrosoft contingent staff, Moderator Monday, April 24, 2017 8:29 AM