file IO, is this a bug in Powershell?

前端 未结 4 1066
南笙
南笙 2021-01-11 16:26

I have the following code in Powershell

$filePath = \"C:\\my\\programming\\Powershell\\output.test.txt\"

try
{
    $wStream = new-object IO.FileStream $file         


        
4条回答
  •  悲&欢浪女
    2021-01-11 17:06

    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
    

提交回复
热议问题