共用方式為


Set-AzSqlElasticJobCredential

更新作業認證

語法

Set-AzSqlElasticJobCredential
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-AgentName] <String>
   [-Name] <String>
   -Credential <PSCredential>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSqlElasticJobCredential
   [-InputObject] <AzureSqlElasticJobCredentialModel>
   -Credential <PSCredential>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSqlElasticJobCredential
   [-ResourceId] <String>
   -Credential <PSCredential>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzSqlElasticJobCredential Cmdlet 會更新作業認證

範例

範例 1

$cred = Get-AzSqlElasticJobCredential -ResourceGroupName rg -ServerName elasticjobserver -AgentName agent -Name cred1
$cred | Set-AzSqlElasticJobCredential -Name cred1 -Credential (Get-Credential)

CredentialName UserName
-------------- --------
cred1          user2

更新作業認證

參數

-AgentName

代理程式名稱

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

-Confirm

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

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

-Credential

認證

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

-DefaultProfile

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

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

-InputObject

作業認證物件

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

-Name

作業認證名稱

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

-ResourceGroupName

資源群組名稱

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

-ResourceId

作業認證資源標識碼

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

-ServerName

伺服器名稱

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

-WhatIf

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

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

輸入

PSCredential

AzureSqlElasticJobCredentialModel

輸出

AzureSqlElasticJobCredentialModel