編集

次の方法で共有


Update-AzManagementGroupHierarchySetting

Updates Hierarchy Settings under the current tenant

Syntax

Update-AzManagementGroupHierarchySetting
      [-GroupName] <String>
      [-Authorization <Boolean>]
      [-DefaultManagementGroup <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzManagementGroupHierarchySetting
      [-GroupName] <String>
      [-Authorization <Boolean>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Update-AzManagementGroupHierarchySetting cmdlet updates the hierarchy settings under the current tenant. Requiring Authorization and setting the DefaultManagementGroup that new groups get created under can be updated.

Examples

Example 1: Update the Hierarchy Setting for Authorization Requirement for Group Creation

Update-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: Update the Hierarchy Setting that the default Management Group new Groups get placed under

Update-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

Update-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

PSHierarchySettings

PSHierarchySettings