New-AzManagementGroup
管理グループを作成します
構文
New-AzManagementGroup
[-GroupName] <String>
[-DisplayName <String>]
[-ParentId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzManagementGroup
[-GroupName] <String>
[-DisplayName <String>]
[-DefaultProfile <IAzureContextContainer>]
-ParentObject <PSManagementGroup>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
New-AzManagementGroup コマンドレットは、GroupName という名前の管理グループを作成します。 DisplayName と ParentId は、新しい管理グループを作成するときにも設定できます。
例
例 1: 管理グループを作成する
New-AzManagementGroup -GroupName "TestGroup"
Id : /providers/Microsoft.Management/managementGroups/TestGroup
Type : /providers/Microsoft.Management/managementGroups
Name : TestGroup
TenantId : 14307de0-5e6f-46cf-b2ba-64a062964d30
DisplayName : TestGroup
UpdatedTime : 2/1/2018 11:06:27 AM
UpdatedBy : 14307de0-5e6f-46cf-b2ba-64a062964d30
ParentId : /providers/Microsoft.Management/managementGroups/14307de0-5e6f-46cf-b2ba-64a062964d30
ParentName : 14307de0-5e6f-46cf-b2ba-64a062964d30
ParentDisplayName : 14307de0-5e6f-46cf-b2ba-64a062964d30
を使用して新しいグループを DisplayName
作成し、 ParentId
設定します null
。 グループ DisplayName
と同じ GroupName
になり、グループの親がテナントになります。
例 2: 表示名を使用して管理グループを作成する
New-AzManagementGroup -GroupName "TestGroup" -DisplayName "TestGroupDisplayName"
Id : /providers/Microsoft.Management/managementGroups/TestGroup
Type : /providers/Microsoft.Management/managementGroups
Name : TestGroup
TenantId : 14307de0-5e6f-46cf-b2ba-64a062964d30
DisplayName : TestGroup
UpdatedTime : 2/1/2018 11:06:27 AM
UpdatedBy : 14307de0-5e6f-46cf-b2ba-64a062964d30
ParentId : /providers/Microsoft.Management/managementGroups/14307de0-5e6f-46cf-b2ba-64a062964d30
ParentName : 14307de0-5e6f-46cf-b2ba-64a062964d30
ParentDisplayName : 14307de0-5e6f-46cf-b2ba-64a062964d30
この場合、グループの親はテナントになり、指定された DisplayName
値に設定されます。
例 3: 親と表示名を持つ管理グループを作成する
New-AzManagementGroup -GroupName "TestGroup" -DisplayName "TestGroupDisplayName" -ParentId "/providers/Microsoft.Management/managementGroups/TestGroupParent"
Id : /providers/Microsoft.Management/managementGroups/TestGroup
Type : /providers/Microsoft.Management/managementGroups
Name : TestGroup
TenantId : 14307de0-5e6f-46cf-b2ba-64a062964d30
DisplayName : TestGroupDisplayName
UpdatedTime : 2/1/2018 11:16:12 AM
UpdatedBy : 14307de0-5e6f-46cf-b2ba-64a062964d30
ParentId : /providers/Microsoft.Management/managementGroups/TestGroupParent
ParentName : TestGroupParent
ParentDisplayName : TestGroupParent
例 4: 親を持つ管理グループを作成する (親オブジェクトを使用)
$parentObject = Get-AzManagementGroup -GroupName "TestGroupParent"
New-AzManagementGroup -GroupName "TestGroup" -ParentObject $parentObject
Id : /providers/Microsoft.Management/managementGroups/TestGroup
Type : /providers/Microsoft.Management/managementGroups
Name : TestGroup
TenantId : 14307de0-5e6f-46cf-b2ba-64a062964d30
DisplayName : TestGroupDisplayName
UpdatedTime : 2/1/2018 11:16:12 AM
UpdatedBy : 14307de0-5e6f-46cf-b2ba-64a062964d30
ParentId : /providers/Microsoft.Management/managementGroups/TestGroupParent
ParentName : TestGroupParent
ParentDisplayName : TestGroupParent
パラメーター
-Confirm
コマンドレットの実行前に確認を求めるメッセージが表示されます。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
管理グループの表示名
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GroupName
管理グループ ID
Type: | String |
Aliases: | GroupId |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ParentId
管理グループの親 ID
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ParentObject
親オブジェクト
Type: | PSManagementGroup |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
コマンドレットの実行時に発生する内容を示します。 このコマンドレットは実行されません。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
入力
None