First, hello all; (passing out the virtual apple pies and such)
I'd like to use StreamWriter for for some large data output and came across Mr. Schofield's (slightly modified) sample code for an introduction to using StreamWriter:
$sw = new-object system.IO.StreamWriter("temp.txt")
$sw.writeline("Some sample text")
$sw.close()
get-content "temp.txt"
Powershell v1 runs this without error, but no file is created. .NET doc appears to say that the file must already exist; ok, created file first; still nothing written to the existing file.
Can someone point me to what I'm missing in what should be a simple usage?