PowerShell: remove or replace quote marks from variable

后端 未结 6 1027
栀梦
栀梦 2021-02-19 02:24

I\'m using Get-EventLog to set a variable, and then setting another variable with the event ID description. I then use blat.exe to email this information to a group.

Th

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-19 02:52

    I actually just got it. The number of quotes and double quotes was confusing me, but this has worked and blat did not error.

    $var -replace '"', ""
    

    Those quotes are: single, double, single, comma, double, double.

提交回复
热议问题