I need to find text in a file, like:
PolicyFile=$(SrcRoot)BeHttp
and replace it with this:
PolicyFile=$(SrcRoot)PPCore/BeHttp
So I wrote following script but it's not working.
Get-ChildItem 'D:\SomeFolder\\*.MKE' -Recurse | ForEach {
(Get-Content $_ | ForEach {
$_ -replace "PolicyFile=$(SrcRoot)BeHttp", "PolicyFile=$(SrcRoot)PPCore//BeHttp"
}) | Set-Content $_
}