Im trying to create a ps script which appends the string ;history directly after ;stylesheets but currently the script is creating an additional line when i want it to append it directly after.
This is how it is suppose to look
;stylesheets;history
But this is what happens
;stylesheets
;history
Can someone explain why?
(Get-Content K:\Temp\test.properties) |
Foreach-Object {
$_
if ($_ -match ";stylesheets")
{ ";history"
}
} | Set-Content K:\Temp\test.properties