共用方式為


Set-AzHDInsightGatewayCredential

設定 Azure HDInsight 叢集的閘道 HTTP 認證。

語法

Set-AzHDInsightGatewayCredential
   [-Name] <String>
   [-HttpCredential] <PSCredential>
   [-ResourceGroupName <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightGatewayCredential
   [-HttpCredential] <PSCredential>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   -InputObject <AzureHDInsightCluster>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightGatewayCredential
   [-HttpCredential] <PSCredential>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   -ResourceId <String>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzHDInsightGatewayCredential Cmdlet 會設定 Azure HDInsight 叢集的網關認證。

範例

範例 1

# Cluster info
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential

Set-AzHDInsightGatewayCredential `
            -ClusterName $clusterName `
            -HttpCredential $clusterCreds

此命令會根據 name 參數集,設定名為 your-hadoop-001 之叢集的閘道認證。

範例 2

Set-AzHDInsightGatewayCredential `
            -ResourceId "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/your-hadoop-001" `
            -HttpCredential $clusterCreds

此命令會設定 ResourceId 參數集名為 your-hadoop-001 之叢集的閘道認證。

範例 3

# Cluster info
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential

Get-AzHDInsightCluster -ClusterName $clusterName | Set-AzHDInsightGatewayCredential `
            -HttpCredential $clusterCreds

此命令會設定由 InputObject 參數集命名為 your-hadoop-001 之叢集的閘道認證。

參數

-AsJob

在背景中執行 Cmdlet。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

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

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-HttpCredential

取得或設定叢集使用者的登入。

類型:PSCredential
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-InputObject

取得或設定輸入物件。

類型:AzureHDInsightCluster
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

取得或設定叢集的名稱。

類型:String
別名:ClusterName
Position:0
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

取得或設定資源群組的名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceId

取得或設定資源標識碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

AzureHDInsightGatewaySettings