This article describes how to test WinRM connectivity from PowerShell. This is useful when troubleshooting connectivity issues with provisioning using the CAPI driver.
Following is a PowerShell script that we can run to test WinRM connectivity. We should run this in PowerShell from the Venafi server that is attempting the provisioning. We need to update the following parameters to match our configuration:
- PASSWORD = Change this to the password that Venafi is using for Device/Application object credentials
- USERNAME = Change this to the username that Venafi is using for Device/Application object credentials
- TARGET_HOSTNAME = Change this to the host name of the target system as defined on Device object
$mypasswd = ConvertTo-SecureString -String "PASSWORD" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ("USERNAME", $mypasswd)
New-PSSession -Name "mysession" -ComputerName "TARGET_HOSTNAME" -Credential $mycreds
Enter-PSSession -Name "mysession"
If the test returns an error we know there is a problem with the credentials or connectivity.