New-AzureCertificateSetting

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

New-AzureCertificateSetting

Creates a setting object to insert an existing certificate into new Azure virtual machines.

Syntax

Parameter Set: Default
New-AzureCertificateSetting [[-StoreName] <String> ] [-Thumbprint] <String> [ <CommonParameters>]




Detailed Description

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

The New-AzureCertificateSetting cmdlet creates a certificate setting object for a certificate that has already been added to Azure. This certificate setting object can be used by the Add-AzureProvisioningConfig cmdlet when creating the configuration object for a new virtual machine using the New-AzureVM or New-AzureQuickVM cmdlet. When included as part of a script to create a virtual machine, this cmdlet adds the specified certificate to the new virtual machine.

Parameters

-StoreName<String>

Specifies the certificate store to place the certificate in.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Thumbprint<String>

Specifies the thumbprint of the certificate.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1

This command creates a certificate setting object for an existing certificate and then stores the object in a variable for later use.


C:\PS> $myWinCert = New-AzureCertificateSetting –Thumbprint "D7BECD4D63EBAF86023BB4F1A5FBF5C2C924902A" –StoreName "My" 

Example 2

This command adds a certificate to the Azure service, and then creates a new Windows virtual machine that uses the certificate.


C:\PS> Add-AzureCertificate –ServiceName "MySvc" –CertToDeploy "C:\temp\MyWinCert.cer"
C:\PS> $myWinCert = New-AzureCertificateSetting –Thumbprint "D7BECD4D63EBAF86023BB4F1A5FBF5C2C924902A" –StoreName "My" 
C:\PC> New-AzureVMConfig -Name "MyVM2" -InstanceSize Small -ImageName $winImage `
 | Add-AzureProvisioningConfig -Windows -Certificates $myWinCert -Password 'pass@word1' ` | New-AzureVM -ServiceName "MySvc"

Related topics

Show: