cd "C:\Users\Mr. Legend\Desktop\dsfsf" Get-ChildItem -Path . -Recurse -Include *.html,*.php | ForEach-Object { (Get-Content $_.FullName) -replace 'legendearn.net', 'yourdomain.com' | Set-Content $_.FullName }