Sample.txt:
SQL.test = True
wer.vul = 1
temp_RTE = False
user_admin = no
In the above text file, I want to search for a string "test" and replace entire line with "SQL.test = False" using Windows Powershell script. If "test" text is not matched, need to add "SQL.test = False" line to that file.
I have tried this. But I am unable to solve.
Please guide me how to achieve this.