共用方式為


New-AzSqlServerTrustGroup

建立或更新伺服器信任群組。

語法

GroupMemberObjectSet (預設值)

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

GroupMemberResourceIdSet

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

Description

建立具有指定位置、成員、信任範圍、名稱和資源群組的新伺服器信任群組。

範例

範例 1

$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。 其成員是 AzureSQL 受控執行個體 ManagedInstance01 和 ManagedInstance02。 其信任範圍是 GlobalTransactions,其資源群組是 ResourceGroup03。

範例 2

$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。 其成員是 AzureSQL 受控執行個體 ManagedInstance01 和 ManagedInstance02,由其資源識別碼提供。 其信任範圍是 GlobalTransactions,其資源群組是 ResourceGroup03。

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:參見

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-GroupMember

要建立的伺服器信任群組的群組成員。

參數屬性

類型:

List<T>[AzureSqlManagedInstanceModel]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

GroupMemberObjectSet
Position:3
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-GroupMemberResourceId

要建立的伺服器信任群組的群組成員。

參數屬性

類型:

List<T>[String]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

GroupMemberResourceIdSet
Position:3
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Location

要建立的伺服器信任群組的位置。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:1
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

要建立的伺服器信任群組名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:2
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ResourceGroupName

資源群組的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:0
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-TrustScope

要建立的伺服器信任群組的信任範圍。

參數屬性

類型:

List<T>[String]

預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 指令未執行。

參數屬性

類型:SwitchParameter
預設值:None
支援萬用字元:False
不要顯示:False
別名:威斯康辛

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

None

輸出

AzureSqlServerTrustGroupModel