![]() |
Install-DtVmwareCertificate |
This cmdlet installs the specified certificate. For this cmdlet, the -ServiceHost needs to be the target server.
Install-DtVmwareCertificate [-Certificate] <X509Certificate2> [-ServiceHost] <Server> [<CommonParameters>]
Required? |
true |
Position? |
2 |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Required? |
true |
Position? |
1 |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters. |
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