I have a file that contains the following:
baseHostname=record.site.com
username=user
password=passwordWhat I am attempting to do is replace everything to the right of the "=" ONLY IN "baseHostname=record.site.com"
I thought I was close with: (get-content $sitepath) -match 'baseHostname' | foreach-object {$_ -replace '/=.+', 'record.site.com'} | set-content $sitepath
Unfortunately what that ended up doing is replacing EVERY item to the right of the = including the equal sign.
Thoughts?
-P