< Back
Test-CGroup
Post
NAME Test-CGroup
SYNOPSIS
Checks if a *local* group exists.
SYNTAX
Test-CGroup [-Name] <String> [<CommonParameters>]
DESCRIPTION
Uses .NET's AccountManagement API to check if a *local* group exists. Returns `True` if the *local* account
exists, or `False` if it doesn't.
PARAMETERS
-Name <String>
The name of the *local* group to check.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Boolean
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CGroup -Name RebelAlliance
Checks if the `RebelAlliance` *local* group exists. Returns `True` if it does, `False` if it doesn't.
RELATED LINKS
Get-CGroup
Install-CGroup
Uninstall-CGroup
SYNOPSIS
Checks if a *local* group exists.
SYNTAX
Test-CGroup [-Name] <String> [<CommonParameters>]
DESCRIPTION
Uses .NET's AccountManagement API to check if a *local* group exists. Returns `True` if the *local* account
exists, or `False` if it doesn't.
PARAMETERS
-Name <String>
The name of the *local* group to check.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Boolean
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CGroup -Name RebelAlliance
Checks if the `RebelAlliance` *local* group exists. Returns `True` if it does, `False` if it doesn't.
RELATED LINKS
Get-CGroup
Install-CGroup
Uninstall-CGroup