Set-​Azure​Sql​Job​Credential

Updates the username or password within an existing credential.

Syntax

Set-AzureSqlJobCredential
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   -Credential <PSCredential>
   -CredentialName <String>
   [<CommonParameters>]
Set-AzureSqlJobCredential
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   -CredentialName <String>
   [-Password <SecureString>]
   [-UserName <String>]
   [<CommonParameters>]

Description

The Set-AzureJobCredential cmdlet updates the username or password within an existing credential.

Examples

Example 1: Update an existing credential

PS C:\>Set-AzureSqlJobCredential -CredentialName "MyCredential" -Credential (Get-Credential)
CredentialName                                                                 UserName                                                                      
--------------                                                                 --------                                                                      
MyCredential                                                                   MyUsername

This command updates the credential named MyCredential with the provided credentials.

Required Parameters

-Credential

Specifies the PSCredential object containing the username and password.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CredentialName

Specifies the name of the credential.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AzureSqlJobConnection

Specifies the connection state object for the job. You can get the connection state object through the New-AzureSqlJobConnection cmdlet. If you do not specify this parameter, the connection state is used from a prior call to the Use-AzureSqlJobConnection cmdlet.

Type:AzureSqlJobConnection
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Password

Specifies the new password for the updated credentials.

Type:SecureString
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserName

Specifies the user name for the updated credential.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False