Avatar of Zack
Zack
Flag for Australia

asked on 

Powershell - Cannot find an overload for ".ctor" and the argument count: "1".

Hi EE,

I am running the following script (the script function is essentially to refresh databases from prod to UAT environments) see attached with the following command:

./Invoke-Edited.ps1 -Environment Test -ScriptBlock {param($p1, $p2)} -ArgumentList $ComputerName, $SQLBackupPath

I am running the scripts remotely and I am getting the following error

Cannot find an overload for ".ctor" and the argument count: "1".
At C:\Invoke-Edited.ps1:54 char:9
+         [ValidateNotNullOrEmpty('DC1PRDSQLFCI02')]

Any assistance is appreciated.

Thank you.
Edited.ps1
PowershellWindows Server 2016Microsoft SQL Server

Avatar of undefined
Last Comment
Zack

8/22/2022 - Mon