After trying to setup a remote PowerShell session the following error occurs.
The WinRM service cannot process the request because the request needs to be sent to a different machine.
Use the redirect information to send the request to a new machine. Redirect location reported: https://mail.mydomain.com/powershell.
To automatically connect to the redirected URI, verify "MaximumConnectionRedirectionCount" property of session preference variable
"PSSessionOption" and use "AllowRedirection" parameter on the cmdlet.
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportRedirectException
+ FullyQualifiedErrorId : PSSessionOpenFailed
Let me tell you what is not the cause so you can skip checking all those things:
- An URL redirect in IIS
- Reinstall of WinRM
- adding “–AllowRedirect” after your connection command let
- "MaximumConnectionRedirectionCount" property setting
- Misconfigured certificate
- PowerShell version
- Invalid credentials
The error doesn't say a lot about the actual cause.
So remember when was the last CU you installed? Bingo, after every CU your IIS settings can get garbled and that’s exactly what happened here.
Changes are your authentication settings in IIS on the PowerShell virtual directory for the frontend website are gone/missing/set incorrectly.
In my case they were gone, no authentication option was set. After setting it al back the way it should be (see this post, you need to make note of this stuff for a working Exchange environment in cases like this) I could create a remote PowerShell session instantly.
you saved my day! Actually all types of authentication have been disabled on my Exchange Servers (apparently during last updates). After enabling basic authentication remote powershell Connections work as before.
ReplyDeleteYeah, it really helps, enabling basic (windows authentication not working) makes all work as before!
DeleteGood replies in return of this issue with genuine arguments and describing all about that.
ReplyDelete