There is no "command".
However, on the SX2000 and 3300 ICP systems you can turn ALL of them off by performing a data save/restore and rebooting across a partition (2K) or reloading and restoring the database on the 3300. A total service outage will result, approx 20 minutes for an SX2K, approx 1 hour for a 3300 (longer if VM messages are saved/restored).
The message waiting lamp status is not saved across a datasave/restore operation. Therefore all lamps will be off following this admittedly drastic procedure.
Once completed be sure to refresh your message waiting lamps via your voice mail server.
Prevent "the problem" from reoccurring by turning off the ability to send msg wtg in all station classes of service (except your voice mail ports, obviously).
This too means that you need to define and use separate classes of service. In a properly designed database you should be using separate classes of service for each type of device, i.e., a separate one just for trunks, another one for your VM ports and still another for your station sets. Some advocate taking that to the next level and have separate classes of service for TDM sets vs IP sets. In our SX2K systems we will typically use a dozen or more classes of service to accommodate specific classes of user (admins, execs, regular users, some wanting a 3-ring rollover, others want a 4-ring, etc). We also put modems and faxes in their own separate class of service to lock them down and prevent forwarding to or from, making sure modems inside the firewall are non-DID (even blocked from DISA) etc.