Why am I getting this error in PowerShell? “echo.> : The term ‘echo.>’ is not recognized…”

I used to be able to create empty files from PowerShell using echo.> myfilename.py. Now all the sudden I get an error message:

echo.> : The term ‘echo.>’ is not recognized as the name of a cmdlet, function, script file, or operable program.

The workaround I found for this is the command. "" > myfilename.py but this creates an empty file with utf-16 encoding and python compiles in utf-8 without BOM. So I tried [System.IO.File]::WriteAllText("myfilename.py", "") for my version of PowerShell which is 5.1, and this doesn’t create any file.

I guess I’m wondering why echo.> doesn’t work anymore and if there is a simple workaround that will allow me to create empty files from PowerShell using UTF-8 encoding.