I've batch file calling a PowerShell script that will execute a set of other scripts and will return some command to a file.
That same process works when I'm dealing with server A being on SQL Server 2008. But, it fails when I'm dealing with server B being on 2012. I'm not sure whether the server version is causing the issue.
If I call the PowerShell script without using the batch file for server B (SQL Server 2012), it works perfectly.
But, when it fails, it generates the below error.
Exception calling "ReadFileList" with "1" argument(s): "An exception occurred while executing a Transact-SQL statement or batch."
At D:\Utilities\WindowsPowerShell\Modules\sqlserver\SQLServer.psm1:2768 char:30
- $restore.ReadFileList <<<< ($server)
- CategoryInfo : NotSpecified: (:) , ParentContainsErrorRecordException
- FullyQualifiedErrorId : DotNetMethodException