Enterprise manager is a GUI for sql scripting. Every command Enterprise Manager execute is a sql script execution. There is a command to do that but I don't konw what it is. Try asking your question at sqljunkies.com
http://www.sqljunkies.com
sqlmag.com was the best resource but they charge now for access. It's hard to find good tips these days.
hope this post was helpful.