Skip to content

Powershell

Write text to file

Terminal window
Add-Content -Value 'First line`r`nSecond line' -Path C:\temp\file.txt
Terminal window
Add-Content -Value @'
First line
Second line
And another one!
'@ -Path C:\temp\file.txt