< Back

Add-AzureRmServiceFabricApplicationCertificate

Tue Jan 29, 2019 10:07 pm

NAME Add-AzureRmServiceFabricApplicationCertificate



SYNOPSIS

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.





SYNTAX

Add-AzureRmServiceFabricApplicationCertificate [-ResourceGroupName] <String> [-Name] <String> -CertificateFile <String> [-CertificatePassword

<SecureString>] [-DefaultProfile <IAzureContextContainer>] [-KeyVaultName <String>] [-KeyVaultResouceGroupName <String>] [-Confirm] [-WhatIf]

[<CommonParameters>]



Add-AzureRmServiceFabricApplicationCertificate [-ResourceGroupName] <String> [-Name] <String> [-CertificateOutputFolder <String>]

[-CertificatePassword <SecureString>] -CertificateSubjectName <String> [-DefaultProfile <IAzureContextContainer>] [-KeyVaultName <String>]

[-KeyVaultResouceGroupName <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Add-AzureRmServiceFabricApplicationCertificate [-ResourceGroupName] <String> [-Name] <String> [-DefaultProfile <IAzureContextContainer>]

-SecretIdentifier <String> [-Confirm] [-WhatIf] [<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.





PARAMETERS

-CertificateFile <String>

The existing certificate file path.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-CertificateOutputFolder <String>

The folder path of the new certificate to be created.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-CertificatePassword <SecureString>

The password of the pfx file.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-CertificateSubjectName <String>

The Dns name of the certificate to be created.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-KeyVaultName <String>

Azure key vault name.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-KeyVaultResouceGroupName <String>

Azure key vault resource group name.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Name <String>

Specify the name of the cluster.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specify the name of the resource group.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SecretIdentifier <String>

The existing Azure key vault secret uri.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String







OUTPUTS

Microsoft.Azure.Commands.ServiceFabric.Models.PSKeyVault







NOTES









Example 1



PS c:> Add-AzureRmServiceFabricApplicationCertificate -ResourceGroupName 'Group1' -Name 'Contoso01SFCluster' -SecretIdentifier

'https://contoso03vault.vault.azure.net/ ... ccc549524f'



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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ertificate

Add-AzureRmServiceFabricClusterCertificate

New-AzureRmServiceFabricCluster