How do you use auto_win?

When I use it on the strategic map where it shows the two armies about to fight, nothing happens, and when I use it on the tactical map during the battle, it says 'command not recognized'