Skip to content

Instantly share code, notes, and snippets.

@andykuszyk
Created August 29, 2016 12:35
Show Gist options
  • Save andykuszyk/675159fd73b022a24ec3393b5a5eb84c to your computer and use it in GitHub Desktop.
Save andykuszyk/675159fd73b022a24ec3393b5a5eb84c to your computer and use it in GitHub Desktop.
A find and replace in files powershell script
Param([string]$fileName, [string]$find, [string]$replace)
(Get-Content $fileName -encoding UTF8) | foreach-object {
$_ -replace $find, $replace
} | Set-Content $fileName -encoding UTF8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment