Quite a simple one this, but also a time saver. If you are in the process of adding site columns and content types to a Content Type Hub, it can take up to one hour for the timer jobs to run to distribute the changes to your site collections, which is sensible for maintaining performance, but a pain if you are making lots of changes and want to see them in your site collections straight away.
In SharePoint 2010, you can now run your timer jobs manually from the UI in Central Administration, but this can still be pain as you have to run the Content Type Hub job, followed by the Content Type Subscriber job for each Web Application receiving the changes – quite a few clicks!
The PowerShell script below allows you to do this a lot quicker as you can just keep running it every time you make a change:
#Run the Content Type Hub timer job
$ctHubTJ = Get-SPTimerJob "MetadataHubTimerJob"
#Run the Content Type Subscriber timer job for a specific Web Application
$ctSubTJ = Get-SPTimerJob "MetadataSubscriberTimerJob" -WebApplication http://portal
I’ll be following this with a script in a future post to show you how you can publish and republish content types inside the Content Type Hub site collection itself.