[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Trying to enumerate the local group of local machine with Powershell

Posted on 2010-01-08
1
Medium Priority
?
563 Views
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.
0
Comment
Question by:brianm71
1 Comment
 
LVL 71

Accepted Solution

by:
Chris Dent earned 1000 total points
ID: 26213731

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

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

Chris
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Loops Section Overview

872 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