Measuring DC motor voltage with an oscilloscope
The ground end of the scope probe is normally connected to AC power ground so you have to be careful.  You cannot measure across two terminals if neither is connected to ground.  Therefore you are correct in being suspicious of connecting the probe directly across the motor since neither motor lead may be grounded.   You can try your second method but you will not be seeing the voltage across the motor but only each terminal with respect to ground.  This may be OK if you are careful in interpreting the waveforms.  Another method is to use the differential mode of your oscilloscope.  Most 2-channel scopes can be set to display the difference in voltage of their 2 channels.  If yours can do that, then connect the high end of the channel 1 probe to one motor terminal and the high end of tge channel 2 probe to the other motor terminal.  If you invert channel 2 (a normal option for scopes than can display channel 1 - channel 2),  and select the difference mode, the scope will display the voltage across the motor.