0

If I got a CSV file and there are a lot of strings that contain exactly "Name".

How do I get to have only Name and not "Name"? -replace won't work as you can't quote the quotes:

$computername.Name = $computername.Name -replace (""", "")    # won't work

edit: example csv export Name,"IPAddress" SVDCO03,"10.10.15.46" SVLIC01,"10.10.20.221" where i need to get those quotas away

Kevin
  • 193
  • 1
  • 4
  • 16

1 Answers1

0

not sure why u are trying to parse the csv you can actually quote the quotes :)

enclose the double quotes inside single and use the regex replace

"name" -replace '"'

or use the string replace method.

"name".replace('"','')
Kiran Reddy
  • 2,836
  • 2
  • 16
  • 20