Advertisement
Guest User

Untitled

a guest
Feb 17th, 2016
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. 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: h
  2. ttps://mail.mailserver.se/owa/PowerShell . To automatically connect to the redirected URI, verify the "MaximumConnectionRedirectionCount" property of the session preference variable "PSSessionOption", and use the "AllowRedirection" p
  3. arameter on the cmdlet.
  4. At line:5 char:12
  5. + $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ht ...
  6.  
  7. New-PSSession : [mail.mailserver.se] Connecting to remote server mail.bluestep.se failed with the following error message : WinRM cannot process the request. The following error occurred while using Kerberos
  8. authentication: The computer mail.bluestep.se is unknown to Kerberos. Verify that the computer exists on the network, that the name provided is spelled correctly, and that the Kerberos configuration for a
  9. ccessing the computer is correct. The most common Kerberos configuration issue is that an SPN with the format HTTP/mail.mailserver.se is not configured for the target. If Kerberos is not required, specify th
  10. e Negotiate authentication mechanism and resubmit the operation. For more information, see the about_Remote_Troubleshooting Help topic.
  11.  
  12. $password = "MyPasswordHere"
  13. $UserName = "domainusername"
  14. $Credentials = New-Object System.Management.Automation.PSCredential("domainusername", $password)
  15.  
  16. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://Mailserver/PowerShell/ -Authentication Kerberos -Credential $Credentials
  17.  
  18. Import-PSSession $Session -AllowClobber
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement