Forum Discussion
Failed to Connect to Exchange Shell from Powershell [PSSession]
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
- SchnittlauchSteel Contributor
I would check for the error the ps told you
"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."
- HappyHappyManCopper Contributor
Schnittlauch Are you kidding? We came here to this page by searching Internet. I seriously thought you posted some solution on other site. If you don't have anything to say, don't say nothing.