Failed to Connect to Exchange Shell from Powershell [PSSession]

Occasional Contributor

Hi All, I was trying to connect powershell to echangeshell, but I got this error, does anyone know how to fix this?

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<ServerFQDN>/PowerShell/ -Authentication Kerberos -Credential $UserCredential

 

and I got a response error:


New-PSSession : [http://<ServerFQDN>/PowerShell/] Connecting to remote server <ServerFQDN> failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the_Remote_Troubleshooting Help topic.
At line:1 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri h ...
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CategoryInfo : OpenError: (System.manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+FullyQualitifiedErrorId : WinRMOperationTimeout,PSSessionOpenFailed

1 Reply