I want my PowerShell script to print something like this:
Enabling feature XYZ......Done
The script looks something like this:
A simplification to FrinkTheBrave's response:
[System.IO.File]::WriteAllText("c:\temp\myFile.txt", $myContent)