PowerShell Genie

Get-LocalGroup

Use Get-LocalGroup to list local security groups on a Windows machine.

Command 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn — get-localgroup

Syntax

1PS> Get-LocalGroup [[-Name] <String[]>] [<CommonParameters>]
2PS> Get-LocalGroup [[-SID] <SecurityIdentifier[]>] [<CommonParameters>]
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-LocalGroup [[-Name] <String[]>] [<CommonParameters>] Get-LocalGroup [[-SID] <SecurityIdentifier[]>] [<CommonParameters>]
  1. Stage 1Get-LocalGroup-Name -SID

    Try it

    Windows PowerShell

    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.

    Interactive simulation · fictional data

    Examples

    Select Name, Description

    1PS> Get-LocalGroup | Select-Object Name, Description
    Show reference output

    Illustrative output · values vary by environment

    Name                  Description
    --------------------  ------------------------------------------------
    Administrators        Administrators have complete and unrestricted ac
    Remote Desktop Users  Members are granted the right to log on remotely

    Get-LocalGroup -SID S-1-5-32-544

    1PS> Get-LocalGroup -SID S-1-5-32-544 # local Administrators, in any language
    Show reference output

    Illustrative output · values vary by environment

    Name            Description
    ----            -----------
    Administrators  Built-in administrators group

    Get-LocalGroup -Name "Remote*"

    1PS> Get-LocalGroup -Name "Remote*"
    Show reference output

    Illustrative output · values vary by environment

    Name                  Description
    ----                  -----------
    Remote Desktop Users  Members allowed to connect using Remote Desktop

    Parameters

    Parameter definitions:

    • -Name
    • -SID

    Microsoft Learn — get-localgroup

    Find a local group by name or SID

    Use -Name for a group name or wildcard and -SID for an identifier. These are separate parameter sets. The SID is useful when a built-in group's displayed name differs by Windows language.

    Groups are not members

    Get-LocalGroup returns group objects, not the accounts inside them. Pipe a selected group to Get-LocalGroupMember when you need its membership.

    Run in the right host

    This module targets Windows local accounts. It is unavailable in 32-bit PowerShell on a 64-bit Windows system. If the command is missing, check the host architecture and module availability before treating it as a permissions failure.

    The sample outputs above use fictional groups. A SID-filtered request returns its matching group; the Remote* request returns names matching that pattern.

    Inspect local user accounts

    Updated 1 October 2026. Browser outputs are fictional; check the installed module help for your environment.

    Recap

    Get-LocalGroup Use Get-LocalGroup to list local security groups on a Windows machine.

    Next: Get-LocalUser
    Genie guideGet-LocalGroup

    Use Get-LocalGroup to list local security groups on a Windows machine. The console below is pre-loaded — run it, then change a value and run it again.