Click or drag to resize
Test-DtVmwareCertificatePolicy

This cmdlet tests the VMWare server certificate policy and if unsuccessful, returns the certificate in use and the corresponding error message. For this cmdlet, the -ServiceHost needs to be the target server.

Syntax

Test-DtVmwareCertificatePolicy [-VmwareServer] <String> [-ServiceHost] <Server> [<CommonParameters>]

Parameters
-VmwareServer<String>

Specify the name of the VMware server (ESX host or vCenter) where the target server is located.

Required?

true

Position?

2

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServiceHost<Server>

Specify the server object returned from the New-DtServer cmdlet.

Required?

true

Position?

1

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

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

Examples

------------------EXAMPLE------------------

A server object is created for the server beta using the domain\administrator and password credentials. It assigns the server object to the variable called DtServerObjectBeta. The server $DTServerObjectBeta is tested to see if the current policy or any valid certificates will allow a connection to the specified VMware server. In this example, assume the return is false. The VMware certificate policy on the server $DTServerObjectBeta is then set to allow all certificates to be installed. The certificate from the Test-DtVmwareCertificatePolicy false return is then installed on the server $DTServerObjectBeta. The connections for the server object are then closed.

$DtServerObjectBeta = New-DtServer -Name beta -UserName domain\administrator -Password password

$TestResult = Test-DtVmwareCertificatePolicy -ServiceHost $DtServerObjectBeta -VmwareServer 112.47.15.6

Set-DtVmwareCertificatePolicy -ServiceHost $DtServerObjectBeta -VmwareServer 112.47.15.6 -Policy AllowAll

Install-DtVmwareCertificate -ServiceHost $DtServerObjectBeta -Certificate $TestResult[1]

Disconnect-DtServer -ServiceHost $DtServerObjectBeta