I have a local application running with an user than have a group policy indicating this user can’t shutdown the pc.
And then I use your code, but when I ask by user and password to impersonate my app. I received the next error
System.Management.ManagementException: it’s not possible to use the user’s credentials for the local connections
Regards