Skip to content

Commit ce9b74a

Browse files
Merge pull request #202470 from lauradolan/batch-certificate
Batch: update certificate instructions for Key Vault
2 parents 9ec66db + 8f3cddd commit ce9b74a

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

articles/batch/credential-access-key-vault.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Use certificates and securely access Azure Key Vault with Batch
33
description: Learn how to programmatically access your credentials from Key Vault using Azure Batch.
44
ms.topic: how-to
5-
ms.date: 08/25/2021
5+
ms.date: 06/22/2022
66
ms.custom: devx-track-azurepowershell
77
---
88

@@ -22,25 +22,7 @@ To authenticate to Azure Key Vault from a Batch node, you need:
2222
2323
## Obtain a certificate
2424

25-
If you don't already have a certificate, the easiest way to get one is to generate a self-signed certificate using the `makecert` command-line tool.
26-
27-
You can typically find `makecert` in this path: `C:\Program Files (x86)\Windows Kits\10\bin\<arch>`. Open a command prompt as an administrator and navigate to `makecert` using the following example.
28-
29-
```console
30-
cd C:\Program Files (x86)\Windows Kits\10\bin\x64
31-
```
32-
33-
Next, use the `makecert` tool to create self-signed certificate files called `batchcertificate.cer` and `batchcertificate.pvk`. The common name (CN) used isn't important for this application, but it's helpful to make it something that tells you what the certificate is used for.
34-
35-
```console
36-
makecert -sv batchcertificate.pvk -n "cn=batch.cert.mydomain.org" batchcertificate.cer -b 09/23/2019 -e 09/23/2019 -r -pe -a sha256 -len 2048
37-
```
38-
39-
Batch requires a `.pfx` file. Use the [pvk2pfx](/windows-hardware/drivers/devtest/pvk2pfx) tool to convert the `.cer` and `.pvk` files created by `makecert` to a single `.pfx` file.
40-
41-
```console
42-
pvk2pfx -pvk batchcertificate.pvk -spc batchcertificate.cer -pfx batchcertificate.pfx -po
43-
```
25+
If you don't already have a certificate, [use the PowerShell cmdlet `New-SelfSignedCertificate`](/powershell/module/pki/new-selfsignedcertificate) to make a new self-signed certificate.
4426

4527
## Create a service principal
4628

0 commit comments

Comments
 (0)