replace a few entries and save

Hi
I have a script that stops a service(noprob here)opens a file(noprob here) replaces a few entries using -replace(noprob here, I verified the variable for the file is changed)
and then saves it.
my problem is I don’t see the actual file being saved with the changes:)
I broke my foreach loop to only one server for easy troubleshooting.
my replace lines and set-content look like this:
$file= get-content “\$server\c$\file.config”
$file -replace ‘entry1 =“1”$’ ,'entry1=“10” ’ `
-replace ‘entry2 =“1”$’ ,'entry1=“10” ’ `
-replace ‘entry3 =“1”$’ ,'entry1=“10” ’ `
|set-content “\$server\c$\file.config”

im sure its something small with the set-content I just cant figure it out:)
any help would be appreciated
Thanks

small mistake:)
it works:)
the file is so big that I was looking at the wrong enteries