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

Posted on 2011-05-11
Last Modified: 2012-06-27
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.
Question by:amendala
    LVL 37

    Accepted Solution

    Something like this:

    Select * from Win32_UserAccount Where LocalAccount = True and Name = 'JohnDoe'

    Author Comment

    That works!

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
    This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now