How to spawn people as spectator

Title says it all i need to know how to make players spawn as a spectator.
Sorry just noticed i was in the wrong section please move me to noob?s.