Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Replacing entries in a csv file

$
0
0

Hi,

I am working on a code where I need to replace certain entries in a csv file. In the Get Content command, I need to use a wildcard for "Server". I tried replacing SERVER with * ,however that did not work. Any idea's, how this can be done.

TSR-SERVICE-MESSAGE ERROR SERVER@@"


Get-Content C:\VPS\TRH_VPS_DB.csv | ForEach-Object { $_ -replace "%CATD_I_066, serviceMessageTrap: errorMessage: TSR-SERVICE-MESSAGE ERROR SERVER@@", "" } | Set-Content C:\VPS\TRH_VPS_DB_1.csv

Thanks


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>