With powershell 2.0:
write-output \"abcd\" >> mytext.txt
returns:
a nul b nul c nul d nul
Powershell works in 16 bit unicode by default, and however you're reading the file is likely in an 8 bit format. You could interpret the sql in an application that can read UTF16, or, because >> is syntactic sugar for the out-file cmdlet, you can do the following instead:
write-output "abcd" | out-file -path mytext.txt -Encoding "UTF8" -Append