Either you have missed out the dash before the p : putty.exe -ssh <IP> -p 22 -l < USERNAME> -pw <PASSWORD> -m C:COMMAND.txt. Or (presuming that was a mistake in typing the command into StackOverflow) it may help us if you posted the contents of C:COMMAND.txt. Try also using the full path to.