To establish a connection between the PowerShell plug-in and Windows PowerShell, you must configure WinRM to use one of the supported communication protocols.
The PowerShell plug-in supports Windows Remote Management (WinRM) 2.0 as a management protocol.
| Authentication method | Details |
|---|---|
| Basic | Non-secure authentication mechanism that requires a user name and a password. |
| Kerberos | Secure authentication protocol that uses tickets to verify the identity of the client and the server. |
WinRM Through HTTP
The PowerShell plug-in supports communication with the WinRM host through the HTTP protocol. Although WinRM authenticates the communication, the data transfer is not encrypted and is sent as plain text on the network. You should use the HTTP protocol if IPSec is configured between the machines that communicate.
To use Basic authentication, you must set the AllowUnencrypted property to true in both the service and client WinRM configuration. For an example of HTTP configuration, see Configure WinRM to Use HTTP.
WinRM Through HTTPS
The PowerShell plug-in supports communication with the WinRM host through the HTTPS protocol. You can use the HTTPS protocol as a more secure communication method.
To use the HTTPS protocol, you must generate a certificate for server authentication and install the certificate on the WinRM host. For an example of HTTPS configuration, see Configure WinRM to Use HTTPS.
Configure WinRM to Use HTTP
You can configure the WinRM host to enable communication with the PowerShell plug-in through the HTTP protocol.
You must modify the WinRM configuration by running commands on the WinRM host machine. You can use the same machine as both the WinRM service and WinRM client.
Caused by: org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file. at org.dom4j.io.SAXReader.read(SAXReader.java:482) at org.dom4j.DocumentHelper.parseText(DocumentHelper.java:278) at com.xebialabs.overthere.cifs.winrm.connector.JdkHttpConnector.sendMessage(JdkHttpConnector.java:117)
Procedure
Configure WinRM to Use HTTPS
You can configure the WinRM host to enable communication with the PowerShell plug-in through the HTTPS protocol.
The WinRM host requires a certificate so that it can communicate through the HTTPS protocol. You can either obtain a certificate or generate one. For example, you can generate a self-signed certificate by using the Certificate Creation tool (makecert.exe) that is part of the .NET Framework SDK.
Prerequisites
- Configure WinRM to use the HTTP protocol. For more information, see Configure WinRM to Use HTTP.
- Verify that you can access the Microsoft Management Console (mmc.exe) on the WinRM host.