What controller/VFD did the spindle come with and what inputs does that accept? a link the the controller datasheet would be helpful.
As a start point have a look at:
https://duet3d.dozuki.com/Wiki/M950
specifically:
When using M950 to create a spindle (from RRF 3.3) use the following format:
M950 R0 C"pwm_pin+forward_pin+reverse_pin" Qfff Laa:bb
C can have 1, 2 or 3 pins. The first pin defined is a pwm capable pin to set the spindle speed. If a second pin is defined it is used as spindle on/of, if three pins are defined then the second pin is spindle forward and the third is spindle reverse. "fff" is the PWM frequency as usual "Laa:bb" sets the RPM range as "aa" to "bb". "Lbb" just sets the max RPM to "bb". Default RPM values are 60 min 10000 max
So depending on the spindle controller you can control on/off, speed and direction. What you may find is you need to translate the Duet's PWM signal into a 0-10V signal for the speed control, lets see what the datasheet says.