Setting the masterpage Url

Masterpages are great. You can change the appearance from your website very easy by modifying the default.master masterpage in the root of your sitecollection. But how do you get all pages beneath to use the same masterpage? Some pages use their own masterpage library, and ignore the one from the sitecollection rootsite.

With this little tool, you can set the masterpage Url for all subwebs of a sitecollection to the masterpage Url from your rootweb, or some url you specify.

Syntax: SharePointMasterpage.exe http://sitecollectionurl [pathToAlternativeMasterpage]

You can download this little tool here.

(If you are in a MOSS environment, you can set the masterpage in the site settings, if you select to use this masterpage for all sites beneath.)

Update:

I updated my tool to set the masterpage Url. Now you can set the masterpage Url for a Web and its subwebs only.

Update April 2011:

The tool will now detect if you are running SharePoint V3 or 2010 and set the masterpage accordingly to default.master or v4.master. This detection is automatically performed, if you do not specify the second parameter.