6.4

Table Of Contents
Ensure that your setup meets the following requirements when generating an SSL certicate to use with
PowerShell remoting:
n
Set the Certicate Enhanced Key Usage (EKU) "Server Authentication" (OID=1.3.6.1.5.5.7.3.1).
n
Set the Certicate Subject to "CN=HOSTNAME".
In all these methods, an SSL certicate in PKCS12 format (PFX le) without a password is generated.
Create a Self-Signed SSL Certificate Using the IIS Manager
If IIS 7 or IIS 8 is installed on the remote server, you can use the IIS Manager to generate self-signed SSL
certicates.
Procedure
1 Open the IIS Manager.
2 In the Connections pane, select the top-most machine node.
3 Click Server  in the Details pane.
4 Click Create Self-Signed  in the Actions pane.
5 Enter HOSTNAME as certicate friendly name.
6 Select Personal as the certicate store.
Create a Self-Signed SSL Certificate Using Makecert.exe
makecert.exe is a part of Microsoft Windows SDK. If you have Microsoft Visual Studio .NET installed, you
can use both the makecert.exe and pvk2pfx.exe tools.
Procedure
1 Open the Visual Studio command prompt as an Administrator.
2 Navigate to the folder where you want to create the certicate les.
3 To create a certicate and a private key le, run the following command:
makecert -r -pe -n "CN=HOSTNAME" -eku 1.3.6.1.5.5.7.3.1 -sky exchange -sv HOSTNAME.pvk
HOSTNAME.cer
4 To convert the les into a .pfx le, run the following command:
pvk2pfx -pvk HOSTNAME.pvk -spc HOSTNAME.cer -pfx HOSTNAME.pfx
5 Deploy the generated SSL certicate to the remote server and import it there.
Create a Self-Signed SSL Certificate Using OpenSSL
You can create a self-signed certicate using OpenSSL.
Prerequisites
Download the Win32 OpenSSL Light package for generating SSL certicates from
hp://slproweb.com/products/Win32OpenSSL.html to a folder of your choice; for example,
C:\Utils\OpenSSL.
Procedure
1 To add Server Authentication to EKU, open openssl.cfg and add extendedKeyUsage seing under the
v3_ca section.
[ v3_ca ] extendedKeyUsage = serverAuth
Chapter 6 Enabling HTTP or HTTPS Protocols for PowerShell Remoting
VMware, Inc. 31