Set-HcsRemoteManagementCert

Set-HcsRemoteManagementCert

Generates the certificate for remote management.

Syntax

Parameter Set: Default
Set-HcsRemoteManagementCert [-CN <String[]> ] [-Force] [ <CommonParameters>]

Detailed Description

The Set-HcsRemoteManagementCert cmdlet generates the certificate for Windows PowerShell® remote management. This cmdlet creates a new certificate and invalidates the old certificate. After the cmdlet finishes, you must install the new certificate on all client machines, and update their hosts files to map the values specified by the CN parameter.

Parameters

-CN<String[]>

Specifies an array of common name (CN) values for the CN field of remote management certificates. To connect to the device by using HTTPS, you can use only names that are in the CN field of the remote management certificate. To connect to the device by using HTTP, you can use the IP addresses in addition to CNs.

On the client, you must install the remote management certificate in the trusted root certificate store, and then map each CN entry to an IP address of the device.

The device comes preinstalled with a certificate containing the names <Serial Number>, <Serial Number>Controller0, and <Serial Number>Controller1. <Serial Number> is the SerialNumber property of the output of the Get-HcsSystem cmdlet. SerialNumber is also the default value of the CN parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

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).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Generate a certificate

This command generates a certificate for Windows PowerShell remote management.

PS C:\> Set-HcsRemoteManagementCert

Get-HcsRemoteManagementCert

Get-HcsSystem