1

我在客户端启用了 Windows 7 64 位、Powershell 2.0 和 CredSSP

Enable-WSManCredSSP -Role Client -DelegateComputer * -Force

我打开 Powershell 控制台,并执行 Enter-PSSession 命令以使用 CredSSP 身份验证连接 Windows 2008 Server:

Enter-PSSession -Computername ServerMOSS -Authentication Credssp -Credential MyDomain\installerUser

我想远程执行 Get-WSManCredSSP 命令,但我收到错误:“...使用协商身份验证时:发生未知安全错误。”

PS C:\Users\myUser> Enter-PSSession -Computername ServerMOSS -Authentication Credssp -Credential MyDomain\installerUser

[ServerMOSS]: PS C:\Users\installerUser\Documents> Get-WSManCredSSP

WinRM cannot process the request. The following error occured while using Negotiate 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 us
e 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.
    + CategoryInfo          :
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.GetWSManCredSSPCommand

[ServerMOSS]: PS C:\Users\installerUser\Documents> Exit-PSSession

IT部门在ServerMOSS中执行这个命令:

PS C:\Users\installerUser\Documents> enabled-psremoting -force

他们得到错误:

WinRM already is set upt to receive requests on this machine
Set-WSManQuickConfig: WinRM cannot process the request. The following error occured while using Negotiate authentication: An unknown security error ocurred.

有什么建议么?

4

2 回答 2

1

我有相同的问题。我已经搜索并发现多次检查/设置 SPN 可以解决问题:

所以试试这个:查看(只读)

setspn.exe -L MACHINENAME

查看 HTTP/HTTPS 条目的结果(或任何重复项)

添加缺少的名称:

setspn -A HTTP/machinename
setspn -A HTTP/machinename.fqdn.com
setspn -A HTTPS/machinename
setspn -A HTTPS/machinename.fqdn.com

来源:WinRM QuickConfig 失败并显示 0x8033809D

于 2013-03-12T16:05:18.740 回答
0

这是由于 HTTPS/HTTP 条目未向 SPN 注册。只需以管理员身份执行以下打开 Powershell :

使用以下命令检查 SPN 条目:

PS C:\> setspn -L 域名\服务器名

然后添加 HTTP/HTTPS 输入:

  1. PS C:\> setspn -A HTTP/servername servername
  2. PS C:\> setspn -A HTTP/servername.fqdn.com 服务器名
  3. PS C:\> setspn -A HTTPS/服务器名 服务器名
  4. PS C:\> setspn -A HTTPS/servername.fqdn.com 服务器名

那么最后你可以在 PowerShell 提示符下使用Enable-PSRemoting -Force

于 2016-07-05T11:57:54.343 回答