cd "D:\File Folder Location" Get-ChildItem -Path . -Recurse -Include *.html,*.php | ForEach-Object { (Get-Content $_.FullName) -replace 'Olddomain.com', 'newdomain.com' | Set-Content $_.FullName }