external help file | ms.assetid | online version | schema |
---|---|---|---|
Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml |
11919623-9EDF-42A3-93FE-54E93D76D3D0 |
2.0.0 |
Creates a certificate setting object for a certificate is in a service.
[!INCLUDE rdfe-banner]
[!INCLUDE rdfe-deprecation-banner]
New-AzureCertificateSetting [[-StoreName] <String>] [-Thumbprint] <String>
[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]
The New-AzureCertificateSetting cmdlet creates a certificate setting object for a certificate that is in an Azure service.
You can use a certificate setting object to create a configuration object by using the Add-AzureProvisioningConfig cmdlet. Use a configuration object to create virtual machine by using the New-AzureVM cmdlet. You can use a certificate setting object to create a virtual machine by using the New-AzureQuickVM cmdlet.
PS C:\> New-AzureCertificateSetting -Thumbprint "D7BECD4D63EBAF86023BB41FA5FBF5C2C924902A" -StoreName "My"
This command creates a certificate setting object for an existing certificate.
PS C:\> Add-AzureCertificate -ServiceName "ContosoService" -CertToDeploy "C:\temp\ContosoCert.cer"
PS C:\> $CertificateSetting = New-AzureCertificateSetting -Thumbprint "D7BECD4D63EBAF86023BB41FA5FBF5C2C924902A" -StoreName "My"
PS C:\> $Image = Get-AzureVMImage -ImageName "ContosoStandard"
PS C:\> New-AzureVMConfig -Name "VirtualMachine17" -InstanceSize Small -ImageName $Image | Add-AzureProvisioningConfig -Windows -Certificates $CertificateSetting -Password "password" | New-AzureVM -ServiceName "ContosoService"
The first command adds the certificate ContosoCert.cer to the service named ContosoService by using the Add-AzureCertificate cmdlet.
The second command creates a certificate setting object, and then stores it in the $CertificateSetting variable.
The third command gets an image from the image repository by using the Get-AzureVMImage cmdlet. This command store the image in the $Image variable.
The final command creates a virtual machine configuration object based on the image in $Image by using the New-AzureVMConfig cmdlet. The command passes that object to the Add-AzureProvisioningConfig cmdlet by using the pipeline operator. That cmdlet add provisioning information to the configuration. The command passes the object to the New-AzureVM cmdlet, which creates the virtual machine.
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Type: ActionPreference
Parameter Sets: (All)
Aliases: infa
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies an information variable.
Type: String
Parameter Sets: (All)
Aliases: iv
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the certificate store in which to put the certificate. Valid values are:
- AddressBook
- AuthRoot
- CertificateAuthority
- Disallowed
- My
- Root
- TrustedPeople
- TrustedPublisher
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the thumbprint of the certificate.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).