The Windows NT Resource Kit provided Kill to forceably stop an application from the command line or batch file.

Alexander Frink brings us close. to gracefully stop an application from the command line or batch.

To use close:

Close "Title Bar text"

where Title Bar text is case sensitive and may end in a * (wildcard).

Typing Close at a command prompt displays a short help.