Problem
As always happens when you take a few days off work, the build server started having problems. When i looked at it the problem in our build was when trying to remove the existing hosts to recreate them. I started looking at the BizTalk Admin Console on the build server. Everything had been ticking over nicely as usual then it all started falling over. When i tried to look at the adapter handlers in the admin console i was getting the following error:
Failed to create a CLSID_BizTalkPropertyBagFactory com component installed with a BizTalk server. A dll initialization routing failed
Ok so from this i deduced the host couldnt be deleted as i was having problems removing the adapter handlers.
Solution
When i tried a couple of things which didnt work i then started looking around but i only found one post which seemed related. They werent doing the exact same thing but it seemed to be in the right area.
The solution is to restart the WMI windows service, then it magically started working again.
It was suggested in the article that it might be caused by the BizTalk BPA. I had ran this a number of days before things started breaking, but as i say it was a number of days before so im not sure if was the cause or not.
Anyway if you need more info the post i found was:
http://www.topxml.com/BizTalk/rn-268100_Problems-with-WMI-SaveToFile-in-BizTalk-2006.aspx