Closed chaoscreater closed 5 years ago
I also ran into this issue, and after debugging I found the underlying error to be this:
Method invocation failed because [System.Management.Automation.CommandMetadata] doesn't contain a method named 'New'.
At line:344 char:3
+ $MetaData = [System.Management.Automation.CommandMetadata]::New($Command)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
I updated line 344 to be this based on another example I found:
$MetaData = [System.Management.Automation.CommandMetadata] $Command
And it worked. I'll create a PR.
@chaoscreator, @meany, Sorry for the late response (as owner, I didn't get any notifications of the issues playing). Thanks you for the feedback, I will merge this in the master branch soon.
@ChaosCreator, @meany, Thanks again for the feedback, I have uploaded a new version with this change.
I can invoke it on Win10 but not on Windows Server 2012 R2: