Powershell: Cannot connect via SSL
- by JSWork
Am following "secrets to powershell remoting" to setup an SLL account and seem to be missing a step.
I ran
Winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname="redacted";CertificateThumbprint="redacted"}
and got
PS WSMan:\localhost> dir wsman:\localhost\listener\Listener_1184937132
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Listener\Listener_1184937132
Name Value Type
---- ----- ----
Address * System.String
Transport HTTP System.String
Port 5985 System.String
Hostname System.String
Enabled true System.String
URLPrefix wsman System.String
CertificateThumbprint System.String
ListeningOn_756355952 10.0.0.54 System.String
ListeningOn_1201550598 127.0.0.1 System.String
PS WSMan:\localhost> dir wsman:\localhost\listener\Listener_1187163138
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Listener\Listener_1187163138
Name Value Type
---- ----- ----
Address * System.String
Transport HTTP System.String
Port 80 System.String
Hostname System.String
Enabled true System.String
URLPrefix wsman System.String
CertificateThumbprint System.String
ListeningOn_756355952 10.0.0.54 System.String
ListeningOn_1201550598 127.0.0.1 System.String
PS WSMan:\localhost> dir wsman:\localhost\listener\Listener_220862350
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Listener\Listener_220862350
Name Value Type
---- ----- ----
Address * System.String
Transport HTTPS System.String
Port 5986 System.String
Hostname redacted System.String
Enabled true System.String
URLPrefix wsman System.String
CertificateThumbprint redacted System.String
ListeningOn_756355952 10.0.0.54 System.String
ListeningOn_1201550598 127.0.0.1 System.String
Trouble is when i do this
PS C:\Users\redacted> enter-pssession -Computername redacted -Credential redacted\redacted -UseSSL
I get this
Enter-PSSession : Connecting to remote server failed with the following error message : The client cannot connect to th
e destination specified in the request. Verify that the service on the destination is running and is accepting requests
. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or Win
RM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the
WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:16
+ enter-pssession <<<< -Computername redacted -Credential redacted\redacted -UseSSL
+ CategoryInfo : InvalidArgument: (redacted:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
This happens even when the firewall is off completely and when the machine tires to connect to itself locally.
On top of that, despite the listners eing lsited on wsman, when I run
PS WSMan:\localhost> Get-PSSessionConfiguration
I get
Name PSVersion StartupScript Permission
---- --------- ------------- ----------
Microsoft.PowerShell 2.0
PS WSMan:\localhost>
Any ideas what I'm missing/doing wrong?
edit: Windows 2003. Powershell v2.0