CmdID

CmdID / PowerShell / Cmdlets / Remove

Remove-LocalGroup

Deletes local security groups. PowerShell reference

From the PowerShell reference 5 parameters Alias rlg

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Deletes local security groups. The Remove-LocalGroup cmdlet deletes local security groups. This cmdlet deletes only a local group. It does not delete the user accounts, computer accounts, or group accounts that belong to that group. You cannot recover a deleted group. If you delete a group and then create another group that has the same group name, you must set new permissions for the new group. The new group does not inherit the permissions that were assigned to the group. NOTE: The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit system.

Remove-LocalGroup [-InputObject] <LocalGroup[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-LocalGroup [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-LocalGroup [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Delete a security group

Remove-LocalGroup -Name "SecurityGroup04"Identify

Its page in the reference: Remove-LocalGroup.

Parameters

5 in the PowerShell reference
-InputObjectSpecifies an array of security groups that this cmdlet deletes. To obtain groups, use the Get-LocalGroup cmdlet.
-NameSpecifies an array of names of the security groups that this cmdlet deletes.
-SIDSpecifies an array of security IDs (SIDs) of security groups that this cmdlet deletes.
-ConfirmPrompts you for confirmation before running the cmdlet.
-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.