0
当我使用以下命令检查DB是否存在时,使用PowerShell抛出错误。Test-Path为多个句点名称的文件抛出错误,
Test-Path SQLSERVER:\SQL\TestServer\TestData\Databases\Data\Site1.Test.User.Com
的ErrorMessage:
Test-Path : Cannot retrieve the dynamic parameters for the cmdlet. SQL Server PowerShell provider error: The number of keys specified does not match the number of keys required to address this object. The number of keys required are: Name.
双引号或单引号不利于得到同样的错误 –
这可能是在'数据库双支架\\ Data'?或者是故意的? – gms0ulman
谢谢纠正“\\”问题,仍然得到相同的错误 –