Trying to enumerate the local group of local machine with Powershell

Posted on 2010-01-08
Last Modified: 2012-05-08
I am trying to enumerate the local groups on the current machine which I am running powershell.  I am using the following:
get-wmiobject win32_group -computername .

This however seems to be pulling more than the local groups.
Question by:brianm71
    1 Comment
    LVL 70

    Accepted Solution


    It returns domain groups as well. Still, you can do something about that :)

    Get-WMIObject Win32_Group -ComputerName . -Filter "LocalAccount='$True'"


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    A commonly asked question on the site recently has been regarding how do I share the GAL between different forests? I want a list of Contacts representing all the users in a remote domain, How do i get them? It's a problem I was posed with a litt…
    "Migrate" an SMTP relay receive connector to a new server using info from an old server.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 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

    9 Experts available now in Live!

    Get 1:1 Help Now