How to find a user in a specific group using wmi

Solution 1:

There are some syntax requirements that may fool the request.

If I do not use the full domain name between quotes sais "The rcp server is unavailable"

for me worked:

wmic /node:"ADSERVER01.local" useraccount where Name='Pirulo' GET Name,SID
Else 
/node:"ADSERVER01.local" /User:"DOMAIN\Max" /Password:"SecretPassword" useraccount where Name='Pirulo' GET Name,SID

By the way, if not asking to the Domain Server it will return "Not instance(s) available"

Best Regards