Get-Localgroup

Get one or more local security groups.

Syntax
      Get-Localgroup [[-Name] String[]] [CommonParameters]

      Get-Localgroup [[-SID] SecurityIdentifier[]] [CommonParameters]

Key

   -name
       An array of names of security groups to get. Accepts wildcards.

   -SID
       An array of security IDs (SIDs) of security groups to get.

You can pipe a string or a SID to this cmdlet.

Examples

Get the local security group called 'SecurityGroup64':

PS C:\> Get-LocalGroup -Name "SecurityGroup64"

“Three groups spend other people’s money: children, thieves, politicians. All three need supervision” ~Dick Armey

Related PowerShell Cmdlets

Add-LocalGroupMember - Add members to a local group.
New-LocalGroup - Add a new local security group.
Remove-LocalGroup - Remove a local group.
Rename-LocalGroup - Rename a local group.
Set-Localgroup - Change a local security group.
Get-ADGroup - Get one or more AD security groups.
New-ADUser - Create a new AD user account.
New-LocalUser - Add a local user account.


 
Copyright © 1999-2024 SS64.com
Some rights reserved