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

Yasser Sobhdel
  • 167
  • 1
  • 8

2 Answers2

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

Martin
  • 563
  • 4
  • 10
  • 25
user435077
  • 26
  • 1
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.

charleswj81
  • 2,433
  • 14
  • 18
  • 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 – Yasser Sobhdel Apr 26 '13 at 11:31