Guys -- All the VFDs I have come in contact with (In real life I work with electronics and electrical controls) have a three phase outputs. All three phases are hot! While it is OK to connect the ground wire (this would be a forth wire connected to the ground lead on the VFD) to both motors at the same time, I suggest you switch all three phases at the same time and only with the VFD in the off position. To do this you need a three or four pole, double throw switch. While you only need three poles, you will probably find four pole double throw switches easier to come by than the three pole versions. You only use three of the four poles. You either need a "Break before Make" switch or a "Center off" switch. This prevents having both motors connected at the same instance should you accidentally hit the switch or have a brain fart and flip it to the other motor position. The three leads coming from the VFD to the switch go to the center row of terminals with one motor connected on each side. To reverse the rotation of a motor, swap any of the three leads.
Jim Arbuckle ABS JS