Hi!
I'm trying to configure a dashboard to get regular updates on the health of our Exchange Servers. Now I've run into a roadblock:
I want to connect from a local server, where our dashboard system is running to our Exchange Edge Servers via Remote PowerShell, but I can't seem to be able to connect. I've activated remote PowerShell on the Edge Servers and tested WinRM, to make sure that we get passed the firewall, but then I get the following errors, depending on how I try to connect:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<ServerName>/PowerShell/ -Authentication Kerberos -Credential $UserCredential``
New-PSSession : [app370300] Connecting to remote server <ServerName> failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: There are currently no logon servers available to service the logon request.``
Possible causes are:``
-The user name or password specified are invalid.``
-Kerberos is used when no authentication method and no user name are specified.``
-Kerberos accepts domain user names, but not local user names.``
-The Service Principal Name (SPN) for the remote computer name and port does not exist.``
-The client and remote computers are in different domains and there is no trust between the two domains. After checking for the above issues, try the following:``
-Check the Event Viewer for events related to authentication.``
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.``
Note that computers in the TrustedHosts list might not be authenticated.`` ``
-For more information about WinRM configuration, run the following command: winrm help config. For more`` ``information, see the about_Remote_Troubleshooting Help topic.``
At line:1 char:12`` ``+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne ...`` ``+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`` `` + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin`` `` gTransportException + FullyQualifiedErrorId : AuthenticationFailed,PSSessionOpenFailed
This error, I can understand. Exchange Online doesn't use IIS, so there is no URL to connect to, but then I tried Enter-PSSession and got this error:
Enter-PSSession -ComputerName <ServerName> -Credential $UserCredential``
Enter-PSSession : Connecting to remote server <ServerName> failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: There are`` ``currently no logon servers available to service the logon request.``
Possible causes are:``
-The user name or password specified are invalid.``
-Kerberos is used when no authentication method and no user name are specified.``
-Kerberos accepts domain user names, but not local user names.``
-The Service Principal Name (SPN) for the remote computer name and port does not exist.``
-The client and remote computers are in different domains and there is no trust between the two domains.`` ``After checking for the above issues, try the following:``
-Check the Event Viewer for events related to authentication.``
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or`` ``use HTTPS transport.``
Note that computers in the TrustedHosts list might not be authenticated.`` ``
-For more information about WinRM configuration, run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.`` ``At line:1 char:1`` ``+ Enter-PSSession -ComputerName <ServerName> -Credential $UserCredential`` ``+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`` `` + CategoryInfo : InvalidArgument: (<ServerName:String) [Enter-PSSession], PSRemotingTransportException`` `` + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
I also tried adding -Authentication Negotiate, but the result was the same. :(
Does anyone here have experience in connecting Remote PowerShell to Exchange Edge Servers? I would be greatful for any and all input.
Best Regards,
Gerrit Deike (System Engineer Exchange)