I have a server
Windows 2012R2 in the domain. This server has no domain user access, only local admin user. I can RDC into this machine using admin account, but cannot have a
New-PSSession does not work.
I have set the Trustedhosts value to '*' already. Still does not work.
$cred = Get-Credential # username: Aministrator, password: secret123 Enter-PSSession -computername SVR1 -Credential $cred
Immediately I get error:
Enter-PSSession : Connecting to remote server SVR1 failed with the following error message : The user name or password is incorrect. For more information, see the about_Remote_Troubleshooting Help topic.
Why I cannot login to the server with local admin acount?
After the comment below, I have tried, SVR1\ADMINISTRATOR as username, then I go a different error message:
Enter-PSSession : Connecting to remote server SVR1 failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: We can't sign you in with this credential because your domain isn't available. Make sure your device is connected to your organization's network and try again. If you previously signed in on this device with another credential, you can sign in with that credential. 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.