From b1499c58041b7a9e6cca43fe1018a013ebf97972 Mon Sep 17 00:00:00 2001 From: Cameron Battagler Date: Thu, 12 Jan 2017 11:31:33 -0600 Subject: [PATCH] Convert to code blocks for syntax highlight --- samples/manage/azure-automation-automated-export/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/manage/azure-automation-automated-export/README.md b/samples/manage/azure-automation-automated-export/README.md index e4d2f038..d455bb83 100644 --- a/samples/manage/azure-automation-automated-export/README.md +++ b/samples/manage/azure-automation-automated-export/README.md @@ -13,16 +13,19 @@ Provides the scripts and lists the steps to set up automatically exporting your 1. Create and uploade the certificates that you will use to authenticate your connection to azure. - Run powershell as admin. - Run the New-SelfSignedCertificate command: + ```powershell $cert = New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -DnsName ``` - Export the certificate as a .cer file + ```powershell Export-Certificate -Cert "cert:\localmachine\my\$($cert.Thumbprint)" -FilePath .cer ``` - Create a corresponding pfx certificate by taking the thumbprint of the newly created certificate and running these commands: + ```powershell $CertPassword = ConvertTo-SecureString -String -Force -AsPlainText Export-PfxCertificate -Cert "cert:\localmachine\my\$($cert.Thumbprint)" -FilePath .pfx -Password $CertPassword