Hi
I have this script but not working.
I need to loop through all the profiles c:\users\* and when you find the "config.ini" file which is usually C:\users\profile01\AppData\Dir modifies a string by another value.
$path = "C:\Users"
foreach-Object{
if((Get-Content $_) -match '192.168.1.1'){
"$_" | Out-File "$Path\config.ini" -Append -Force -NoClobber
(Get-Content $_) |
Foreach-Object {$_ -replace '192.168.1.1', '172.20.1.1'} |
Set-Content $_
}
}