Error when connecting via Windows Remote Management

1

I have a simple PowerShell script that uses Invoke-Command to invoke a PowerShell ScriptBlock on a remote computer through Windows Remote Management (WinRM). The script is being executed from a Windows Server 2012 system, and targeting a Windows 8.1 system.

The script is very simple, and looks something like this:

Invoke-Command -ComputerName client03 -ScriptBlock { Get-Process; };

Here is the error:

[client03] Connecting to remote server client03 failed with the following error message : WinRM cannot process the
request. The following error with errorcode 0x80090322 occurred while using Kerberos authentication: An unknown
security error occurred.
 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.
    + CategoryInfo          : OpenError: (client03:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : -2144108387,PSSessionStateBroken

Furthermore, when I try to connect to the remote computer's administrative network shares, I'm seeing the following error message: "The target account name is incorrect."

Error Message

When I try to connect to the computer's administrative share in a local session, I get the error: "The specified network name is no longer available."

Error Message

windows
powershell
winrm
asked on Stack Overflow Feb 14, 2014 by Trevor Sullivan

1 Answer

0

It turns out that the target computer had recently been rebuilt, and it had a temporary computer name. There was still an old DNS entry for the computer, so connecting to the computer using the old name resulted in an error "The target account name is incorrect."

After renaming the computer, and referring to the computer using its correct name, the problem disappeared. Alternatively, connecting to the computer using its IP address was successful.

Computer Name

answered on Stack Overflow Feb 14, 2014 by Trevor Sullivan

User contributions licensed under CC BY-SA 3.0