Somebody asked me this question this week and what I thought would be quite easy turned out to be a little hard. On a Exchange 2003 box there is a WMI class Exchange_Server that you can use to do this and there is a sample in the Exchange SDK here . But this WMI class isn’t available in Exchange 2000, The PSS knowledge base offers two solutions one is based on looking for event id 1217 or 1216 in the event log and the other one is to use the Guid from the Uninstall key in the registry and they supply all the Guid's for Exchange 2000 Q296587 . Unfortunately there didn’t seem to be the same information available for Exchange 2003. A check of the ExBPA which seems to be using the same method did yield all the GUID'S for Exchange 2003 as well as the SBS versions. The Exbpa actually makes quite a good scripting reference if you have a look at the “ExBPA.Config.xml” config file there’s quite a lot of good information about how they are going about retrieving various pieces of infor
Pushing the Envelope in Messaging and Office 365 Development