Get-SCCertificate

Gets a security certificate object from a VMware vCenter Server, from a VMware ESX host, or from a Citrix XenServer host.

Syntax

Get-SCCertificate [-ComputerName] <String> [-TCPPort <UInt32>] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
Get-SCCertificate [-Filename] <String> [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Get-SCCertificate cmdlet gets a security certificate object from a vCenter Server, from an ESX host, or from a XenServer host. You can use this cmdlet to import a non-trusted certificate into Virtual Machine Manager (VMM) so that you can use the certificate with the Add-SCVirtualizationManager cmdlet, the Set-SCVirtualizationManager cmdlet, the Add-SCVMHost cmdlet, or the Set-SCVMHost cmdlet.

The certificate is required in order to establish a Secure Socket Layer (SSL) connection between the VMM server and the vCenter Server, ESX host, or XenServer host.

Examples

Example 1: Retrieve the security certificate for the specified VMware vCenter Server

PS C:\> Get-SCCertificate -ComputerName "vCenterServer01.Contoso.com"

This command gets the security certificate object for the vCenter Server server named vCenterServer01 located in the Contoso.com domain, and displays the security certficate information.

Example 2: Retrieve the security certificate for a specified VMware ESX host

PS C:\> $ESXCert = Get-SCCertificate -ComputerName "ESXHost01.Contoso.com"
PS C:\> $ESXCert | Get-Member

The first command gets the security certificate object from the ESX host named ESXHost01 and stores the object in the $ESXCert variable.

The second command passes the contents of $ESXCert to the Get-Member cmdlet, which displays the .NET type and a list of methods and properties for the certificate object.

Example 3: Retrieve the security certificate for the specified Citrix XenServer host

PS C:\> Get-SCCertificate -ComputerName "XenServer01.Contoso.com"

This command gets the security certificate object for the XenServer named XenServer01 located in the Contoso.com domain, and displays the security certficate information.

Parameters

-ComputerName

Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are:

- FQDN

  • IPv4 or IPv6 address
  • NetBIOS name

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Filename

Specifies the name of the certificate that this cmdlet retrieves.

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TCPPort

Specifies a numeric value that represents a TCP port.

Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

Certificate

This cmdlet returns a **Certificate** object.