New-AzureSqlJobCredential

Creates database credentials when connecting to databases to run jobs.

Syntax

New-AzureSqlJobCredential
   -CredentialName <String>
   -Credential <PSCredential>
   [-EncryptionCertificateThumbprint <String>]
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [<CommonParameters>]

Description

The New-AzureSqlJobCredential cmdlet creates database credentials (username and password) when connecting to databases to run jobs. Passwords are encrypted locally prior to transmission through the use of a public key stored within the Elastic Database Jobs database.

Examples

Example 1: Create a new credential using the specified name

PS C:\>New-AzureSqlJobCredential -CredentialName MyCredential
CredentialName                                              UserName
--------------                                              --------
MyCredential                                                MyUsername

This command creates a new credential using the provided name. Following cmdlet invocation, you are prompted for the username and password credentials.

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies the PSCredential containing the username and password.

Type:PSCredential
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-CredentialName

Specifies the name of the credential.

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

-EncryptionCertificateThumbprint

Specifies that the certificate's thumbprint must match the provided thumbprint prior to encryption of the password.

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