I was having problems with this code any many with me I noticed when I started to search for an answer. I got some clues from a forum that if you type the command and not just copy it from this site it works. I then copied the text from this site and pasting it into a Hex editor, then I started typing it manually and noticed that the "-i" part was marked as "96 69" in hex from the pasted text and "2D 69" when I typed it.
The error message was:
sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query –i WsusDBMaintenance.sql
Sqlcmd: ':\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i WsusDBMaintenance.sql': Unexpected argument. Enter '-?' for help.
So in conclusion if the code string does not work when you copy it from the site try to type it manually (or at least the - signs).