I had a comment recently on one of my older posts (which was about processing a cube with XMLA) asking how I scripted out the process command from SQL Server Management Studio. It is much easier to explain this with pictures than with words alone, hence this post.
If you right click on an object in the object browser in management studio and click on the process option you will get a dialog box like the one below.
This dialog has a "Script" button at the top, like many of the dialogs in Management Studio.
Clicking on the button itself will script the action to a new query window or you can click on the drop down arrow next to this button to get a list of other possible places to send the script to.