Sql server 2012 &引用;恢复SQLdatabase";NT授权登录失败\匿名登录

Sql server 2012 &引用;恢复SQLdatabase";NT授权登录失败\匿名登录,sql-server-2012,powershell-2.0,database-backups,database-restore,Sql Server 2012,Powershell 2.0,Database Backups,Database Restore,我有一个用于DB备份/恢复的powershell脚本。出于某种原因,我正在使用new pssession和invoke命令远程执行脚本。我是 1.connecting to remote server 2.the local server is in a domain 3.the remote server is in same domain 4.Using the domain account which exist in both the machine and have admin rig

我有一个用于DB备份/恢复的powershell脚本。出于某种原因,我正在使用
new pssession
invoke命令
远程执行脚本。我是

1.connecting to remote server
2.the local server is in a domain
3.the remote server is in same domain
4.Using the domain account which exist in both the machine and have admin rights.
5.My SQL Service (I mean the instance/engine) is running with 
  the same Domain account
使用命令备份
backup SQLdatabase
成功,但恢复
restore SQLdatabase
失败 错误为NT AUTHORITY\ANONYMOUS LOGON登录失败

只是为了尝试/出错,我在必须进行恢复但运气不佳的计算机中的管理组中添加了“NT AUTHORITY\ANONYMOUS LOGON”

任何关于我做错了什么(或)我如何解决这个问题的线索

谢谢你的帮助

谢谢


编辑:开关
-SQLTrustedConnection
能解决这个问题吗?

尝试一点后,我发现了一个窍门。必须进行还原的计算机我以用户身份添加了“NT AUTHORITY\ANONYMOUS LOGON”

如何添加:

使用SSMS->扩展安全->扩展登录->右键单击登录->创建新登录连接到DB实例