Sql server 调用SqlCmd-got';NT授权\匿名登录';输入PSSession后出错?

Sql server 调用SqlCmd-got';NT授权\匿名登录';输入PSSession后出错?,sql-server,windows,powershell,Sql Server,Windows,Powershell,我从我的电脑ClientPC中输入psseion后,在RemoteServer上运行了以下查询。(我需要使用Windows集成安全性) 它的错误是 调用Sqlcmd:用户“NT授权\匿名登录”的登录失败 然后我做了以下步骤 在远程服务器上 Enable-WSManCredSSP -Role server 它回来了 CredSSP Authentication Configuration for WS-Management CredSSP authentication allows the se

我从我的电脑
ClientPC
中输入psseion后,在
RemoteServer
上运行了以下查询。(我需要使用Windows集成安全性)

它的错误是

调用Sqlcmd:用户“NT授权\匿名登录”的登录失败

然后我做了以下步骤

在远程服务器上

Enable-WSManCredSSP -Role server
它回来了

CredSSP Authentication Configuration for WS-Management CredSSP authentication allows the server to accept user credentials from a remote computer. If you enable CredSSP authentication on the server, the server will have access to the user name and password of the client computer if the client computer sends them. For more information, see the Enable-WSManCredSSP Help topic. Do you want to enable CredSSP authentication? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): cfg : http://schemas.microsoft.com/wbem/wsman/1/config/service/auth lang : en-US Basic : false Kerberos : true Negotiate : true Certificate : false CredSSP : true CbtHardeningLevel : Relaxed
但是我仍然得到了错误?

如果在客户端和服务器上都启用了CredSSP(这是双跳身份验证所必需的),那么您只需将身份验证显式指定为CredSSP,因为默认情况下它不会与之连接

Enter-PSSession RemoteServer -Authentication Credssp -Credential (Get-Credential)

如果在客户端和服务器上都启用了CredSSP(这是双跳身份验证所必需的),则只需显式地将身份验证指定为CredSSP,因为默认情况下它不会与其连接

Enter-PSSession RemoteServer -Authentication Credssp -Credential (Get-Credential)
Enter-PSSession RemoteServer -Authentication Credssp -Credential (Get-Credential)