Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1009
  • Last Modified:

WMI "Select" query for a local user account that EXISTS?

I am seeking a WMI "select" query that I can use to determine whether or not a local user account on a workstation exists.

For instance, a query that would evaluate TRUE if the local account "JohnDoe" existed.  This query would be used for targeting GPOs and Group Policy Preferences.

Any help is appreciated.
1 Solution
Gerwin Jansen, EE MVETopic Advisor Commented:
Something like this:

Select * from Win32_UserAccount Where LocalAccount = True and Name = 'JohnDoe'
amendalaAuthor Commented:
That works!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now