【发布时间】:2016-08-13 12:09:02
【问题描述】:
我只是尝试将 SQL 备份恢复到我的恢复服务器并编写了脚本来执行此操作,但我在 PowerShell 控制台上收到此错误:
方法调用失败,因为 [System.IO.DirectoryInfo] 不包含名为“op_Addition”的方法。
在行:39 字符:1
+ $dbRestoreLog.LogicalFileName = $dbname + "_Log"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (op_Addition:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
【问题讨论】:
-
好吧,如果不显示一些代码,很难提供帮助,但我猜您正在尝试将字符串添加到 System.IO.DirectoryInfo 的实例中
-
您确实需要发布产生错误的代码。
标签: powershell database-restore