Windows – getting “access denied” using “wmic”

windowswindows-server-2012-r2wmi

I have two machines, A and B, and a both with a local user called Bob that can RDP into both machines.

However, when I'm on machine A, that I open "cmd.exe", and then type wmic /node:"machine-b" process call create "ipconfig", I'm getting "Access denied." Vice versa from B to A.

If Bob is a local admin on B, I am able to wmic from A. This is not preferable from a security standpoint.

What are my options to deal with this?

Thank you very much in advance for your help.

Edit:
The local passwords for Bob are the same on both machines, which are also connected to the same Domain.

Best Answer

This works when there are matching named user accounts on both machines where the password for both user accounts is the same. This is a function of pass-through NTLM authentication. One option for you would be to use different users accounts on each machine and pass the appropriate username/password in your commands. Another option would be to join these machines to the same Active Directory domain, which would require you to deploy an AD domain