Original poster needs to clarify the situation:
(1) Are you proposing to switch incoming power to the drive on and off using external contactors frequently (bad), and if so, are you proposing to switch power on with a simultaneous motion command and/or with the motor still spinning (coasting) from the previous switch-off (extra-bad)? Are you proposing to switch power off using contactors in the incoming power if the motor is still turning, or even under power (extra-really-bad)? All of these are asking for the magic smoke to come out. The other thing that you haven't told us, is whether this is a little 1/2 horsepower motor with next to no inertial load, or a 75 horsepower motor driving an enormous gearbox with a huge inertial load. It makes a difference. A little motor with next to no inertia, you can get away with stuff that a big one won't let you get away with.
(2) Or, are you proposing to leave incoming power to the drive, but switching the motor on and off using "drive enable" or the designed-in motion-enable and motion-command inputs, and allowing the drive to ramp motor speed up and down smoothly? This is OK - this is what they are designed to do.
(3) Is the situation safety-related? If it is, use a drive that has integral "safe torque off" as mentioned in a previous post. Use your safety and non-safety logic in conjunction to do this properly (easiest with a PLC and safety PLC). You may in some situations when there is a protective-stop condition, have to do a controlled stop by ramping speed down and then opening "safe torque off". The smart person in charge of the risk assessment for the machine needs to be aware of this and potentially have their input on this.
(4) Is the situation safety-related and you are using an old clunker of a drive that doesn't have STO? Or you are using a new drive that has it, but the rest of your control system isn't smart enough to handle it properly? Good luck. Again, the smart person in charge of the risk assessment needs to be aware of this and potentially have their input on this.