I am trying to connect to intermedia's powershell from using PS-Session but I am coming across an error.
Here is the command
New-PSSession -Name "email@consoto.com" -ConnectionUri http://exchange.intermedia.net/powershell -ConfigurationName Hosting.PowerShell -Credential "email@consoto.com" -Authentication Basic
However it fails with this error:
The WinRM client cannot process the request. If the
authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the
TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about
that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic
What have I tried
I tried adding the ip address to the trusted hosts as mentioned in the main stackoverflow webpage when searching for this issue:Connecting to remote server failed using WinRM from PowerShell powershell v2 remoting - How do you enable unencrypted traffic
PS C:\WINDOWS\system32> winrm set winrm/config/client '@{TrustedHosts="162.244.197.102"}'
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = true
Auth
Basic = true
Digest = true
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = false
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts = 162.244.197.102
Intermedia actually has there own powershell script that connects to exchange using PS-Session but it doesn't work on powershell.core becasue they added a Credman module to the script. I am trying to find a way to run PS-Session to this place without using there PS1 script if possible. Here is a github of there link of the powershell script. Let me know if there is anything I am missing to make this work:https://github.com/Masterjx9/intermediapowershell/blob/main/Hosting.Powershell.ps1
Thanks!