| document type | external help file | HelpUri | Locale | Module Name | ms.date | PlatyPS schema version | title |
|---|---|---|---|---|---|---|---|
cmdlet |
linuxtools-Help.xml |
en-US |
linuxtools |
11/09/2025 |
2024-05-01 |
Remove-LocalGroup |
Remove a local security group
Remove-LocalGroup [-Name] <string> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
This cmdlet has the following aliases, {{Insert list of aliases}}
Remove a local security group
Remove-LocalGroup -Name "mygroup" Removes the local security group named "mygroup"
Remove-LocalGroup -Name "mygroup" -Force Removes the local security group named "mygroup" even if users have it as their primary group
Remove-LocalGroup -Name "mygroup" -WhatIf This example shows what would happen if the group "mygroup" were to be removed without actually executing the command.
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Forces the removal of the group even if users have it as their primary group.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Name of the group to remove
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function requires superuser privileges to remove a group. Ensure that you have the necessary permissions to run this command. Use with caution, as it will permanently delete the group and its members. Be sure to back up any important data before proceeding.