az account management-group

Manage Azure Management Groups.

Commands

az account management-group create

Create a new management group.

az account management-group delete

Delete an existing management group.

az account management-group list

List all management groups.

az account management-group show

Get a specific management group.

az account management-group subscription

Subscription operations for Management Groups.

az account management-group subscription add

Add a subscription to a management group.

az account management-group subscription remove

Remove an existing subscription from a management group.

az account management-group update

Update an existing management group.

az account management-group create

Create a new management group.

Create a new management group.

az account management-group create --name
                                   [--display-name]
                                   [--parent]

Examples

Create a new management group.

az account management-group create --name GroupName

Create a new management group with a specific display name.

az account management-group create --name GroupName --display-name DisplayName

Create a new management group with a specific parent.

az account management-group create --name GroupName --parent ParentId/ParentName

Create a new management group with a specific display name and parent.

az account management-group create --name GroupName --display-name DisplayName --parent ParentId/ParentName

Required Parameters

--name -n

Name of the management group.

Optional Parameters

--display-name -d

Sets the display name of the management group. If null, the group name is set as the display name.

--parent -p

Sets the parent of the management group. Can be the fully qualified id or the name of the management group. If null, the root tenant group is set as the parent.

az account management-group delete

Delete an existing management group.

Delete an existing management group.

az account management-group delete --name

Examples

Delete an existing management group

az account management-group delete --name GroupName

Required Parameters

--name -n

Name of the management group.

az account management-group list

List all management groups.

List of all management groups in the current tenant.

az account management-group list [--query-examples]

Examples

List all management groups

az account management-group list

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

az account management-group show

Get a specific management group.

Get the details of the management group.

az account management-group show --name
                                 [--expand]
                                 [--query-examples]
                                 [--recurse]

Examples

Get a management group.

az account management-group show --name GroupName

Get a management group with children in the first level of hierarchy.

az account management-group show --name GroupName -e

Get a management group with children in all levels of hierarchy.

az account management-group show --name GroupName -e -r

Required Parameters

--name -n

Name of the management group.

Optional Parameters

--expand -e

If given, lists the children in the first level of hierarchy.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--recurse -r

If given, lists the children in all levels of hierarchy.

az account management-group update

Update an existing management group.

Update an existing management group.

az account management-group update --name
                                   [--add]
                                   [--display-name]
                                   [--force-string]
                                   [--parent]
                                   [--remove]
                                   [--set]

Examples

Update an existing management group with a specific display name.

az account management-group update --name GroupName --display-name DisplayName

Update an existing management group with a specific parent.

az account management-group update --name GroupName --parent ParentId/ParentName

Update an existing management group with a specific display name and parent.

az account management-group update --name GroupName --display-name DisplayName --parent ParentId/ParentName

Required Parameters

--name -n

Name of the management group.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--display-name -d

Updates the display name of the management group. If null, no change is made.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--parent -p

Update the parent of the management group. Can be the fully qualified id or the name of the management group. If null, no change is made.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.