dir/b > files.txt
I guess it has to be done in PowerShell to preserve unicode signs.
Since powershell deals with objects, you need to specify how you want to process each object in the pipe.
This command will get print only the name of each object:
dir | ForEach-Object { $_.name }