Remote WMI Access to a Windows XP machine

If you are getting a 0x80070005 COM exception (or UnauthorizedAccessException in C#) while attempting a remote WMI connection to a Windows XP host, even though you are connecting as an admin user in the remote host and you are providing the correct username and password, you may wish to check if ForceGuest is enabled on that host. It is enabled by default.

In C# it happens when you call the Connect() method of the ManagementScope object.

Set the value of the forceguest key to 0 in the following registry location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

This should fix the problem.

Author: Musaul Karim

Software Engineer, Hobbyist Photographer, and a bit of a gadget geek.

Leave a Reply

Your email address will not be published. Required fields are marked *