Output (“echo”) a variable to a text file

The simplest Hello World example…

$hello = "Hello World"
$hello | Out-File c:\debug.txt

Leave a Comment