Home Dashboard Directory Help
Search

v3 - $MyInvocation.ScriptName or MyCommand Blank Inside ForEach-Object Loops by JakFrost


Status: 

Active


1
1
Sign in
to vote
Type: Bug
ID: 772063
Opened: 11/23/2012 12:25:03 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

$MyInvocation is now foobared after upgrade to 3.0 inside ForEach-Object loops and it's missing the $MyInvocation.MyCommand.Name property that used to refer to the name of the script.

Coincidentally the $MyInvocation.ScriptName property is now foobared in the main script scope and shows blank.

So both of these properties that should show the name of the script are exclusively farked up.
Details
Sign in to post a comment.
Sign in to post a workaround.