You cannot call a method on a null-valued expression.
manikandanid opened this issue · comments
I am getting the following error while running the command
You cannot call a method on a null-valued expression.
At S:\Philips\Apps\iSite\Tools\SHDBAutoDeployService\Sensors\Content\Invoke-CommandAs.psm1:194 char:59
-
$UsingVariables = $ScriptBlock.ast.FindAll <<<< ({$args[0] -is [System.Management.Automation.Language
.UsingExpressionAst]},$True)
+ CategoryInfo : InvalidOperation: (FindAll:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
What version of Powershell are you running on?
$PSVersionTable
What version of the module are you running?
Get-Module -Name Invoke-CommandAs
And how did you install the module? from the Powershell Gallery? or from GitHub?
Sorry, you need v3 or higher
Thanks and please add the same info in set of system requirements. So that this does not occur. BTW your script is great and handy but i cant use it due to version mismatch.