I have the following code in Powershell
$filePath = \"C:\\my\\programming\\Powershell\\output.test.txt\" try { $wStream = new-object IO.FileStream $file
If your goal is to write into a logfile or text file, then you could try the supported cmdlets in PowerShell to achieve this?
Get-Help Out-File -Detailed