0

I have added a "SearchingUser" user to administrators group of a remote server "RemoteServer". I am trying to verify the user is added to the server using WMIC and this is the command:

wmic /node:RemoteServer useraccount where "name='SearchingUser' and Domain='domainNameHere'" list

I am sure the user is added but the query result is:

"No Instance(s) Available"

How can I find if the user is added to specified group thru WMI

Thanks

2 Answers 2

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

0

Your syntax seems correct but what are you using for the value of Domain? Is the user a local or domain user? Assuming it's a local user, the value of Domain needs to be the computer's hostname.

1
  • I am using a domain user and also passing the domain value as well. Can you please test it in another real environment and see if it works. Thanks Apr 26, 2013 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .