Convert to code blocks for syntax highlight

This commit is contained in:
Cameron Battagler
2017-01-12 11:15:56 -06:00
parent bec643a573
commit 0a2cdd6040
@@ -13,14 +13,18 @@ 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
```powershell
$cert = New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -DnsName <certificateName>
```
- Export the certificate as a .cer file
- `Export-Certificate -Cert "cert:\localmachine\my\$($cert.Thumbprint)" -FilePath <PathAndFileName>.cer`
```powershell
Export-Certificate -Cert "cert:\localmachine\my\$($cert.Thumbprint)" -FilePath <PathAndFileName>.cer
```
- Create a corresponding pfx certificate by taking the thumbprint of the newly created certificate and running these commands:
- $CertPassword = ConvertTo-SecureString -String &lt;YourPassword&gt; -Force -AsPlainText
- Export-PfxCertificate -Cert "cert:\localmachine\my\$($cert.Thumbprint)" -FilePath &lt;PathAndFileName&gt;.pfx -Password $CertPassword
```powershell
$CertPassword = ConvertTo-SecureString -String <YourPassword> -Force -AsPlainText
Export-PfxCertificate -Cert "cert:\localmachine\my\$($cert.Thumbprint)" -FilePath <PathAndFileName>.pfx -Password $CertPassword
```
- Upload the .cer file to your subscription [in the old portal](https://manage.windowsazure.com/)
- Upload the .pfx file to the certificates under Assets in the automation account that you want to use on Azure. You will use the password you gave in the previous step to authenticate it.
2. Create new a new credentials asset to authenticate your server with.