Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

Entries from 2017-03-07 to 1 day

Set-Variable doesn't overwrite a variable when an empty list passed through pipe

Context: You can set a value to variable with Set-Variable. > "foo" | Set-Variable var > $var foo You can also overwrite a value of variable like this: > "foo" | Set-Variable var > $null | Set-Variable var > $var Problem: The value of vari…