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-04-04 to 1 day

ConvertTo-Csv or Export-Csv always add double quote to all columns

ConvertTo-Csv or Export-Csv always add double quote to all columns. Get-Help Export-Csv -Full shows samples of CSV with no double quotes, but it seems there are no options to suppress double quote. This behavior doesn’t depend on system lo…

Avoid error when adding duplicated keys to hash (case sensitivity in hash tables on PowerShell)

Problem: Keys of hash tables are case sensitive in most languages (Java/JavaScript/Perl/Ruby/…). But in PowerShell, key of hash table is case insensitive (if you use string as key), so you will bump into errors in code like: PS > $hash = @…