Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 可以登录到SQL server,但Powershell无法进行身份验证_Sql Server_Powershell - Fatal编程技术网

Sql server 可以登录到SQL server,但Powershell无法进行身份验证

Sql server 可以登录到SQL server,但Powershell无法进行身份验证,sql-server,powershell,Sql Server,Powershell,在一年多的时间里,我安排了一个Powershell脚本来查询SQLServer2008并输出结果 现在我发现了一个错误 "Login failed for user 'sem7'. Reason: The password of the account has expired." 当我将sem7的密码重置为原始密码时,我可以登录到SQL Server,并且依赖此数据库的其他应用程序可以从中提取数据。但是,我在运行脚本时仍然会遇到相同的错误 当我试图在SQL server上更改sem7的密码并

在一年多的时间里,我安排了一个Powershell脚本来查询SQLServer2008并输出结果

现在我发现了一个错误

"Login failed for user 'sem7'.  Reason: The password of the account has expired."
当我将sem7的密码重置为原始密码时,我可以登录到SQL Server,并且依赖此数据库的其他应用程序可以从中提取数据。但是,我在运行脚本时仍然会遇到相同的错误

当我试图在SQL server上更改sem7的密码并运行PowerShell时,我得到了一个错误

"Login failed for user 'sem7'."

我怎么解决这个问题呢?是否需要为sem7设置一些权限,以便PowerShell可以查询它?

sem7是本地用户还是域用户?@Paul sem7是SQL Server数据库的本地用户SQL Server不关心尝试连接的内容(PowerShell或其他)。除非你有一个正在进行检查的登录触发器。SQL错误日志中有什么内容?“你可能对那里发生的事情有更好的解释。”本图尔谢谢你,我相信这解决了问题!