Set-SBCertificateAutogenerationKey
You can use this cmdlet to change a key used for encrypting auto-generated certificates. Note that this cmdlet regenerates the certificate authority and certificates.
Parameter Set: AutoGeneratedCert
Set-SBCertificateAutogenerationKey -Key <SecureString> [-IgnoreEncryptionError] [-LastCertificateThumbprint <String> ] [-SBFarmDBConnectionString <String> ] [ <CommonParameters>]
Run Set-SBCertificateAutogenerationKey to replace the certificate which was automatically generated when creating the Service Bus for Windows Server farm.
Use this cmdlet to follow security compliance requirement of changing certificate. You can also use it if you have forgotten the key used to create the auto generated certificate.
If you have previously copied the certificate authority to your client machines and since this cmdlet re-generated it, you must retrieve it using the Get-SBAutoGeneratedCA cmdlet and copy it to your client machines again.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
The input type is the type of the objects that you can pipe to the cmdlet.
The output type is the type of the objects that the cmdlet emits.
Replace the current farm certificate with a new certificate.
PS C:\> $mycert=ConvertTo-SecureString -string myPassword1 -force -AsPlainText
Set-SBCertificateAutogenerationKey –Key $mycert