Add-AzureRmServiceFabricApplicationCertificate
Add a new certificate to the Virtual Machine Scale Set(s) that make up the cluster. The certificate is intended to be used as an application certificate.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are
advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and
updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing
any continued use at the user's discretion and risk. Please refer to our
migration resources for guidance on transitioning to the Az module.
Syntax
ByExistingKeyVault
Add-AzureRmServiceFabricApplicationCertificate
[-ResourceGroupName] <String>
[-Name] <String>
-SecretIdentifier <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByNewPfxAndVaultName
Add-AzureRmServiceFabricApplicationCertificate
[-ResourceGroupName] <String>
[-Name] <String>
-CertificateSubjectName <String>
[-KeyVaultResouceGroupName <String>]
[-KeyVaultName <String>]
[-CertificateOutputFolder <String>]
[-CertificatePassword <SecureString>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByExistingPfxAndVaultName
Add-AzureRmServiceFabricApplicationCertificate
[-ResourceGroupName] <String>
[-Name] <String>
-CertificateFile <String>
[-KeyVaultResouceGroupName <String>]
[-KeyVaultName <String>]
[-CertificatePassword <SecureString>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use Add-AzureRmServiceFabricApplicationCertificate to install a certificate to all nodes in the cluster.
You can specify a certificate you already have or have the system generate a new one for you, and upload it to a new or existing Azure key vault.
Examples
Example 1
PS c:> Add-AzureRmServiceFabricApplicationCertificate -ResourceGroupName 'Group1' -Name 'Contoso01SFCluster' -SecretIdentifier 'https://contoso03vault.vault.azure.net/secrets/contoso03vaultrg/7f7de9131c034172b9df37ccc549524f'
This command will add a certificate from existing Azure key vault to all node types of the cluster.
Example 2
PS c:\> $pwd = ConvertTo-SecureString -String '123' -AsPlainText -Force
PS C:\> Add-AzureRmServiceFabricApplicationCertificate -ResourceGroupName 'Group2' -Name 'Contoso02SFCluster' -KeyVaultName 'Contoso02Vault' -KeyVaultResouceGroupName 'Contoso02VaultRg'
-CertificateSubjectName 'cn=Contoso.com' -CertificateOutputFolder 'c:\test' -CertificatePassword $pwd
This command will create a self-signed certificate in the Azure key vault with the key vault resource group name and key vault Name, installs to all node types of the cluster, and downloads the certificate under folder 'c:\test'. The name of the certificate downloaded is same as the name of key vault certificate.
Parameters
-CertificateFile
The existing certificate file path.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Source
Parameter sets
ByExistingPfxAndVaultName
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-CertificateOutputFolder
The folder path of the new certificate to be created.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Destination
Parameter sets
ByNewPfxAndVaultName
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-CertificatePassword
The password of the pfx file.
Parameter properties
Type: SecureString
Default value: None
Supports wildcards: False
DontShow: False
Aliases: CertPassword
Parameter sets
ByNewPfxAndVaultName
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByExistingPfxAndVaultName
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-CertificateSubjectName
The Dns name of the certificate to be created.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Subject
Parameter sets
ByNewPfxAndVaultName
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KeyVaultName
Azure key vault name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByNewPfxAndVaultName
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByExistingPfxAndVaultName
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-KeyVaultResouceGroupName
Azure key vault resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByNewPfxAndVaultName
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByExistingPfxAndVaultName
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specify the name of the cluster.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ClusterName
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
Specify the name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-SecretIdentifier
The existing Azure key vault secret uri.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByExistingKeyVault
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Parameters: CertificateFile (ByValue), CertificateOutputFolder (ByValue), CertificateSubjectName (ByValue), KeyVaultName (ByValue), KeyVaultResouceGroupName (ByValue), SecretIdentifier (ByValue)
Parameters: CertificatePassword (ByValue)
Outputs