Several years ago, I submitted a post to Mac OS X Hints. At the time, I worked for an Apple authorized service provider, and wanted an easy way to switch a customer’s computer to our Software Update Server temporarily, then switch back afterwards. Two users in the Mac OS X Hints forums helped me build an AppleScript application for this purpose.
I have since made significant improvements to the script, and still use it today. The code can be found in my GitHub repository.
Tested with: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9