Get-LocalGroups.ps1

by Nov 27, 2008

# Get-LocalGroups.ps1 # Gets local groups using WMI and Win32_Group class # Effectively, the 6th sample from http://msdn.microsoft.com/en-us/library/aa394586 # Thomas Lee – tfl@psp.co.uk # Get Win32 Group Accounts $Accts = Get – WMIObject Win32_Group | where { $_ .LocalAccount} # Display them $accts | ft Name, Sid, SidType, Status – autosize This script produces the following output: PS C:foo> .Get… Read the full text.