Splitting a string into separate variables

后端 未结 5 1785
死守一世寂寞
死守一世寂寞 2020-12-13 16:42

I have a string, which I have split using the code $CreateDT.Split(\" \"). I now want to manipulate two separate strings in different ways. How can I separate t

5条回答
  •  悲&欢浪女
    2020-12-13 17:22

    Try this:

    $Object = 'FirstPart SecondPart' | ConvertFrom-String -PropertyNames Val1, Val2
    $Object.Val1
    $Object.Val2
    

提交回复
热议问题