WMI "Privilege not held" error when attempting to remote shutdown a machine RRS feed

  • Question

  • I have some code that attempts to shutdown a remote Vista (home) machine from an XP machine in a workgroup. The code sets ConnectionOptions username/password Impersonate etc

    It then utilizes 
    ManagementObjectSearcher to get access to win32_OperatingSystem. It all works correctly and I can list the properties (machine name etc) of the remote machine from the instance returned. However, when I try and invoke the Win32Shutdown method I get an exception "Privilege not held"

    I can't find a way to request the privilege or add it to the remote user. I can see in the Vista security event log that access is being denied because the remote credentials aren't being used. In other words I can see the login request for my remote user for the other operations but when shutdown is called those credentials are no longer present.

    Monday, July 21, 2008 4:57 AM