Michael Klement

Results 1234 comments of Michael Klement

@SteveL-MSFT, I agree with @jborean93. To spell it out: a fix (technically a breaking change, but most likely bucket-3) is called for that simply _disables_ native globbing via splatting.

Thanks, @jborean93. In a nutshell: * With an indirectly specified _scalar_ argument, enclosure in `"..."` is effective in suppressing globbing; applied to @theJasonHelmick's example: `$a = '*'; /bin/echo "$a"` *...

To add some context: * You're referring to the installation script at https://github.com/PowerShell/PowerShell/blob/master/tools/install-powershell.ps1, whose raw content can be retrieved via https://aka.ms/install-powershell.ps1 * As of this writing, said script exposes _some_...

Interesting. The problem equally affects nested `Start-ThreadJob` and `Start-Job` calls and also affects Windows PowerShell, so it long predates #16564 (though they're conceptually related). It seems to come down to...

@237dmitry, the problem at hand is about nested `$using` contexts _in the context of remoting_, so your sample code doesn't apply (and, as I had already noted, "Note that direct...

Thanks, @jborean93 - that's handy. So to spell out the repro in a cross-platform manner: ```powershell Remove-Variable -ErrorAction Ignore foo '$foo = 1; ForEach-Object -Parallel { $using:foo }' > t.ps1...

@237dmitry: Do _not_ define a `$foo` variable _locally_, because the code then _accidentally_ works. Run the repro exactly as provided. The point is that the _nested_ `$using:foo` reference - the...

> Yes, when $foo set not in script (t.ps1), the error occurs Yes, but that part _works as designed_: in the context of `t.ps1` alone, `$using:foo` inside `ForEach-Object -Parallel` requires...

@237dmitry, to avoid creating a distraction I've hidden my responses to your comments. Assuming we've reached a shared understanding, I encourage you to hide your comments too.

Good point, @DarkLite1: * Initializing `$foo` in the caller's scope (the first `$foo = 1`) makes the _error_ go away ... * ... but the nested `$using:foo` reference (inside the...