I'm new in Powershell, my code doesn't work, I can't figure out why despite spending hours trying..
What I would like to do: 1) Ask for user to type an IP Address 2) Find and replace a text by this IP Address
My variables
$demande_server = Read-Host "IP Address" >> c:\temp\SQLtemp.txt
$address = Get-Content -Path "c:\temp\SQLtemp.txt"
Then
(Get-Content -path c:\temp\SQL.txt) | foreach {$_ -replace("NomServeur=","NomServeur="$address")} >> c:\temp\SQL.txt
Thank you for your help :)

