New-EntraSecurityGroup
SYNOPSIS
Creates a new security group in Active Directory that syncs to Azure.
SYNTAX
New-EntraSecurityGroup [-GroupName] <String> [-TaskNumber] <String> [[-ReferenceGroup] <String>] [-SyncCheck]
[[-Description] <String>] [-AADGroup] [-UseOwnAADAuthentication] [<CommonParameters>]
DESCRIPTION
The `New-EntraSecurityGroup` function creates a new security group in Active Directory under the organizational unit `OU=Azure,OU=Application Groups,OU=Security Groups,DC=gentgrp,DC=gent,DC=be`. The group is configured with the required criteria (mail address and Universal group scope) to sync to Azure. It supports creating cloud-only groups, syncing memberships from reference groups, and using custom Azure AD authentication sessions.
EXAMPLES
EXAMPLE 1
Creates a new security group named "MyGroup" in Active Directory with the task number "T12345".
EXAMPLE 2
Creates a new cloud-only Azure AD group named "MyCloudGroup" with the specified description.
EXAMPLE 3
Creates a new security group named "MyGroup" and copies members from the "ExistingGroup". Waits for the group to sync to Azure.
EXAMPLE 4
Creates a new security group named "MyGroup" using the user's own Azure AD authentication session.
PARAMETERS
-GroupName
The name of the group to be created.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TaskNumber
The task number associated with the group creation.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ReferenceGroup
The name of an existing group whose members will be copied to the new group.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SyncCheck
A switch parameter that, when specified, waits for the group to sync to Azure.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Description
A description for the group.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AADGroup
A switch parameter that, when specified, creates a cloud-only Azure AD group instead of an on-premises group.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-UseOwnAADAuthentication
A switch parameter that, when specified, uses the user's own Azure AD authentication session instead of the default service principal.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.