New-AzSqlServerTrustGroup
建立或更新伺服器信任群組。
PowerShell
New-AzSqlServerTrustGroup
[-ResourceGroupName] <String>
[-Location] <String>
[-Name] <String>
[-GroupMember] <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Sql.ManagedInstance.Model.AzureSqlManagedInstanceModel]>
[-TrustScope <System.Collections.Generic.List`1[System.String]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PowerShell
New-AzSqlServerTrustGroup
[-ResourceGroupName] <String>
[-Location] <String>
[-Name] <String>
[-GroupMemberResourceId] <System.Collections.Generic.List`1[System.String]>
[-TrustScope <System.Collections.Generic.List`1[System.String]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
建立具有指定位置、成員、信任範圍、名稱和資源群組的新伺服器信任群組。
PowerShell
$managedInstanceList = @()
$mi = Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01"
$managedInstanceList += $mi
$mi = Get-AzSqlInstance -Name "ManagedInstance02" -ResourceGroupName "ResourceGroup02"
$managedInstanceList += $mi
New-AzSqlServerTrustGroup -ResourceGroupName "ResourceGroup03" -Location "West Europe" -Name "ServerTrustGroup01" -GroupMember $managedInstanceList -TrustScope "GlobalTransactions"
在西歐位置建立名為 ServerTrustGroup01 的新伺服器信任群組。 其成員為 Azure SQL 受管理執行個體 ManagedInstance01 和 ManagedInstance02。 其信任範圍為 GlobalTransactions,其資源群組為 ResourceGroup03。
PowerShell
$mi1 = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01"
$mi2 = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup02/providers/Microsoft.Sql/managedInstances/ManagedInstance02"
New-AzSqlServerTrustGroup -ResourceGroupName "ResourceGroup03" -Location "West Europe" -Name "ServerTrustGroup01" -GroupMemberResourceId $mi1,$mi2 -TrustScope "GlobalTransactions"
在西歐位置建立名為 ServerTrustGroup01 的新伺服器信任群組。 其成員是 Azure SQL 受管理執行個體 ManagedInstance01 和 ManagedInstance02,由其資源識別元指定。 其信任範圍為 GlobalTransactions,其資源群組為 ResourceGroup03。
執行 Cmdlet 之前先提示您確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
要建立的伺服器信任群組群組成員。
類型: | List<T>[AzureSqlManagedInstanceModel] |
Position: | 3 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
要建立的伺服器信任群組位置。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
要建立的伺服器信任群組名稱。
類型: | String |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
資源群組的名稱。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
None