You can also do this without any script :
Lets say you need 10 random positions
1- Place your group or unit on the map
2- Place 9 markers (F6) next to them (the current position of your unit /group is the 10th position, so you 'll need 9 markers instead of 10)
3- Group (F2) every marker with that group or unit (when it's a group, you only have to group the marker with the leader)
4- Drag every marker to the place you want them to start.
5- Change all 9 markers to the "empty" type
When you preview the mission the group or unit will randomly start on one of those markerpositions.
Groups will start together btw and it works in MP.
That's all.