익명 17:53

Powershell connect to remote server failed with "The user name or password is in...

Powershell connect to remote server failed with "The user name or password is incorrect"

Attempting to connect from domainA to a remote Exchange server in domainB using PowerShell results in the error: "The user name or password is incorrect".

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://server1.domainB.tld/PowerShell/ -Credential $cred

New-PSSession: [server1.domainB.tld] Connecting to remote server server1.domainB.tld failed with the following error message: The user name or password is incorrect.

This occurs with two other servers in domainB.

My username is in UPN format [email protected]. Using domainB\me results in the error: "There are currently no logon servers available to service the logon request."

I also tried connecting to domainB from other domains and receive the same results.

wsman:\localhost\client\trustedhosts is set to the correct values.

I can RDP with the same credentials successfully.

The account is a Domain Admin. The Servers are Windows Server 2012 R2.

PSRemoting is enabled.

PSSessionConfiguration

Name          : microsoft.powershell
PSVersion     : 4.0
StartupScript : 
RunAsUser     : 
Permission    : BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed

Name          : microsoft.powershell.workflow
PSVersion     : 4.0
StartupScript : 
RunAsUser     : 
Permission    : BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed

Name          : microsoft.powershell32
PSVersion     : 4.0
StartupScript : 
RunAsUser     : 
Permission    : BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed

Name          : microsoft.windows.servermanagerworkflows
PSVersion     : 3.0
StartupScript : 
RunAsUser     : 
Permission    : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed

I tried remoting from a server in domainB to server1.domainB and it works. So it has something to do with connecting from outside of domainB.

Test auth in IIS works fine

wsman trustedhosts - Added FQDN of client to server. Added FQDN and IP of server to client. No change.

What do I need to fix to be able to remote in here?



Top Answer/Comment:

If it was a privileges issue, the error would say something like 'access denied'.

Somehow the server actually doesn't know your user (or the PW is incorrect).

You said that you are trying to connect 'from DomainA to DomainB'. That sounds like your user is located in DomainA, but you are telling the server that your user is located in DomainB.

Try connecting with [email protected] or me\domainA.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다