James O'Neill

Results 347 comments of James O'Neill

**Unlike** `remove-item` (`rm` / `del`) and `copy-item` (`cp` / `copy`) The `Get-item` and `Get-ChildItem` commands (`dir` / `ls`) work without any parameters so inside the command path being null/empty selects...

> @jhoneill `Get-Item` not only does not have the same behaviour. It also makes a difference between $null Sorry brain fade on my part. Of course only Get-Childitem works with...

I think this a version of #16741 which is still a problem in 7.2.5 but fixed in the current preview of 7.3

>This is fairly weird behaviour, it seems like the return in the if statement is bypassing the $null = accumulator as I would not expect this to output anything >...

It may be Telemetry trying to find its server in which case Setting the environment variable `POWERSHELL_TELEMETRY_OPTOUT` to true, yes, or 1 might help But I think this is checking...

> This is a historical issue. It looks like the same problem has existed since 2019. > > > #10983 > > If anyone has the same problem, please refer...

> How do chars compare, as chars or as strings? `Compare-Object`'s`CaseSensitive` parameter does not affect the result (and this is expected behavior for non strings, IMO). But: > > ```...

It always puzzled me that this is also allowed ``` function test { param ( ${foo bar} ) $PSBoundParameters } ``` the parameter can be passed by position ``` >...

Definitely should be a script analyzer rule if nothing else. I doubt if the the `param ($1, $2, $3)` is common - even in batch files converted to PowerShell scripts,...