The New-AzManagementGroup cmdlet creates a management group.
Examples
Example 1: Create a Management Group
PS C:\> New-AzManagementGroup -GroupName "TestGroup"
Id : /providers/Microsoft.Management/managementGroups/TestGroup
Type : /providers/Microsoft.Management/managementGroups
Name : TestGroup
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
DisplayName : TestGroup
UpdatedTime : 2/1/2018 11:06:27 AM
UpdatedBy : 00001111-aaaa-2222-bbbb-3333cccc4444
ParentId : /providers/Microsoft.Management/managementGroups/00001111-aaaa-2222-bbbb-3333cccc4444
ParentName : 00001111-aaaa-2222-bbbb-3333cccc4444
ParentDisplayName : 00001111-aaaa-2222-bbbb-3333cccc4444
Creation of a new group with DisplayName and ParentId set to null. The DisplayName will be same as the GroupName and the parent of the group will be the tenant.
Example 2: Create a Management Group with a display name
PS C:\> New-AzManagementGroup -GroupName "TestGroup" -DisplayName "TestGroupDisplayName"
Id : /providers/Microsoft.Management/managementGroups/TestGroup
Type : /providers/Microsoft.Management/managementGroups
Name : TestGroup
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
DisplayName : TestGroup
UpdatedTime : 2/1/2018 11:06:27 AM
UpdatedBy : 00001111-aaaa-2222-bbbb-3333cccc4444
ParentId : /providers/Microsoft.Management/managementGroups/00001111-aaaa-2222-bbbb-3333cccc4444
ParentName : 00001111-aaaa-2222-bbbb-3333cccc4444
ParentDisplayName : 00001111-aaaa-2222-bbbb-3333cccc4444
In this case, the parent of the group will be the tenant and the DisplayName will be set to the value given.
Example 3: Create a Management Group with a parent and a display name
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.