Cannot generate a PowerShell object for a ScriptBlock dereferencing variables undeclared in the param(.) block. Name of undeclared ...