Uninstall-Group

Removes a local group.

Syntax

Uninstall-Group [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Uninstall-Group function removes a local group using .NET's DirectoryServices.AccountManagement API. If the group doesn't exist, returns without doing any work or writing any errors.

This function was added in Carbon 2.1.0.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String

The name of the group to remove/uninstall.

true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

Input Types

System.String.

EXAMPLE 1

Uninstall-WhsGroup -Name 'TestGroup1'

Demonstrates how to uninstall a group. In this case, the TestGroup1 group is removed.