Powershell · 2016-03-18

PowerShell – Replace All Instances Of Something In All Files In Directory

This script searches every file in a directory for a particular string and replaces it with another value.

get-childItem  | ForEach { (Get-Content $_ | ForEach {$_ -replace "OLDVALUE,"NEWVALUE"}) | Set-Content $_}