Get-LocalGroupMember
Use Get-LocalGroupMember to list the members of a local group, including domain accounts that belong to it.
Documentation: Microsoft Learn — PowerShell module reference
Syntax
See the command anatomy
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Get-LocalGroupMember [-Group] <LocalGroup> [[-Member] <string>] [<CommonParameters>]- Stage 1Get-LocalGroupMember
-Group -Member
Try it
PowerShell example · browser support is limited.
Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.
Follow the objects
Run the command to inspect each stage.
Examples
Get-LocalGroupMember -Group Administrators
Show reference output
Sample output · fictional data, shaped like the real thing
Name ObjectClass PrincipalSource ------------- ----------- --------------- Administrator svc_backup
Get-LocalGroupMember -SID S-1-5-32-544
Show reference output
Sample output · fictional data, shaped like the real thing
Name Enabled LastLogon ------------- ------- -------------------- Administrator True 9/10/2026 7:52:09 PM svc_backup True 9/10/2026 2:00:15 AM
Get-LocalGroupMember -Group "Remote Desktop Users"
Show reference output
Sample output · fictional data, shaped like the real thing
Name PrincipalSource ------------- --------------- Administrator svc_backup
Parameters
Parameter definitions:
-Group-Member
Practical use and troubleshooting
Practical scenario: Use Get-LocalGroupMember when you need to list the members of a local group, including domain accounts that belong to it. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.
Common error and fix: Unresolved member SIDs can cause membership enumeration errors. Inspect the specific identity in the error and distinguish stale entries from a complete, successfully resolved member list. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.
See also: Get-LocalGroup. Get-LocalGroupMember enumerates membership; Get-LocalGroup describes the group itself. Resolve the target group before treating its name as evidence of who has access. Read the linked command before substituting it; similar names do not imply identical inputs or output.
Recap
Get-LocalGroupMember Use Get-LocalGroupMember to list the members of a local group, including domain accounts that belong to it.
Next: Get-ADGroupMember