Поделиться через


Get-SCCertificate

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

Syntax

ByRemoteComputer

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

ByLocalFilename

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByRemoteComputer
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Filename

Specifies the name of the certificate that this cmdlet retrieves.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByLocalFilename
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TCPPort

Specifies a numeric value that represents a TCP port.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByRemoteComputer
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

Certificate

This cmdlet returns a Certificate object.