You used Get-Content to get the content- you can use Set-Content to set it!
Set-Content -Path C:\OnSomePath\Result.log -Value 'No gather issue found on relay'
solved I need help on a power shell script to create output file on C:\onsomepath after it compares a log file for a string value [closed]