Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot dot source / invoke script on 2012 R2 #5

Closed
chaoscreater opened this issue May 15, 2019 · 4 comments
Closed

Cannot dot source / invoke script on 2012 R2 #5

chaoscreater opened this issue May 15, 2019 · 4 comments
Assignees
Labels

Comments

@chaoscreater
Copy link

I can invoke it on Win10 but not on Windows Server 2012 R2:

image

@meany
Copy link

meany commented Jun 28, 2019

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.

meany added a commit to meany/Join-Object that referenced this issue Jun 28, 2019
@meany
Copy link

meany commented Jun 28, 2019

#7

@iRon7
Copy link
Owner

iRon7 commented Jul 14, 2019

@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.

@iRon7 iRon7 added the bug label Jul 14, 2019
@iRon7 iRon7 self-assigned this Jul 14, 2019
iRon7 added a commit that referenced this issue Jul 17, 2019
3.0.5     2019-07-14 meany       Issue #5, resolved: Cannot dot source / invoke script on 2012 R2 bug
3.0.6     2019-07-16 Ronald Bode Issue #6, improved performance (~2x on large tables), thanks to @burkasaurusrex' suggestion
@iRon7
Copy link
Owner

iRon7 commented Jul 17, 2019

@ChaosCreator, @meany,
Thanks again for the feedback, I have uploaded a new version with this change.

@iRon7 iRon7 closed this as completed Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants