If you have a PowerShell script that you are calling from cmd.exe, you might run into the following error:
Write-Host : The OS handle’s position is not what FileStream expected. Do not use a handle simultaneously in one FileStream and in Win32 code or another FileStream. This may cause data loss.
This is bug in PowerShell V1 and V2, and happens when:
- a PowerShell command generates both regular and error output
- you …



