ConvetFrom-String 複数行文字列をコレクションオブジェクトへ変換

 PS> "taro,18","hanako,15"
 taro,18
 hanako,15
 PS> "taro,18","hanako,15" | ConvertFrom-String -Delimiter "," -PropertyNames "name", "age"
 name   age
 ----   ---
 taro    18
 hanako  15
 PS> $data = "taro,18","hanako,15" | ConvertFrom-String -Delimiter "," -PropertyNames "name", "age"
 PS> $data | ConvertTo-Json
 [
     {
         "name":  "taro",
         "age":  18
     },
     {
         "name":  "hanako",
         "age":  15
     }
 ]

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS