New-AzManagementGroupHierarchySetting
Creates Hierarchy Settings under the current tenant
Syntax
New-AzManagementGroupHierarchySetting
[-GroupName] <String>
[-Authorization <Boolean>]
[-DefaultManagementGroup <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzManagementGroupHierarchySetting
[-GroupName] <String>
[-Authorization <Boolean>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzManagementGroupHierarchySetting cmdlet creates new hierarchy settings under the current tenant. Requiring Authorization and setting the DefaultManagementGroup that new groups get created under can be set.
Examples
Example 1: Create a Hierarchy Setting for an Authorization Requirement for Group Creation
New-AzManagementGroupHierarchySetting -GroupName c7a87cda-9a66-4920-b0f8-869baa04efe0 -Authorization True
Id : /providers/Microsoft.Management/managementGroups/c7a87cda-9a66-4920-b0f8-869baa04efe0/settings/default
Type : Microsoft.Management/managementGroups/settings
Name : default
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
RequireAuthorizationForGroupCreation : true
DefaultManagementGroup :
Example 2: Create a Hierarchy Setting for the default Management Group new Groups get placed under
New-AzManagementGroupHierarchySetting -GroupName c7a87cda-9a66-4920-b0f8-869baa04efe0 -DefaultManagementGroup TestGroup
Id : /providers/Microsoft.Management/managementGroups/c7a87cda-9a66-4920-b0f8-869baa04efe0/settings/default
Type : Microsoft.Management/managementGroups/settings
Name : default
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
RequireAuthorizationForGroupCreation : false
DefaultManagementGroup : TestGroup
Example 3: Create both Hierarchy Settings
New-AzManagementGroupHierarchySetting -GroupName c7a87cda-9a66-4920-b0f8-869baa04efe0 -Authorization True -DefaultManagementGroup TestGroup
Id : /providers/Microsoft.Management/managementGroups/c7a87cda-9a66-4920-b0f8-869baa04efe0/settings/default
Type : Microsoft.Management/managementGroups/settings
Name : default
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
RequireAuthorizationForGroupCreation : true
DefaultManagementGroup : TestGroup
Parameters
-Authorization
Indicate whether RBAC access is required upon group creation under the root Management Group. True means user will require Microsoft.Management/managementGroups/write action on the root Management Group. Default setting is false.
Type: | Boolean |
Aliases: | RequireAuthorizationForGroupCreation |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultManagementGroup
Expand the output to list the children of the management group
Type: | String |
Aliases: | DefaultMG |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GroupName
Management Group Id
Type: | String |
Aliases: | GroupId |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
Azure PowerShell