Friday, August 19, 2011

Search and replace text with Powershell

Just a Powershell newbie post: I am trying to search and replace text in a file using Powershell.

Get-Content <source-file> | ForEach-Object {$_ -replace <original-text>, <replacement-text>} | Set-Content <destination-file>

No comments:

Post a Comment