Tuesday, November 18, 2003

MSH Provider Architecture

I've been delving a bit more in to the provider architecture of MSH. In MSH, you have the several default providers, including a file store provider, a registry provider, etc. I discussed this in my post yesterday. The idea of providers is that they provide a way to surface data into MSH. The PDC bits come with an AD provider and a Registry provider, although the latter at least is pretty primitive.

Each provider provides a drive, which in turn contains containers, and items. Containers, of course, can contain more containers and items. Each item is some fundamental data structure, as surfaced by the provider. If, for example, you built a DNS provider DNSProvider.dll), a particular server could be identified by a different "drive", which could then be enumerated to list all the zones on that DNS server. For example, you could do something like:

new/provider -Provider DNS -assembly DNSProvider.dll
new/drive -name MyDNSServer -Provider DNS -root ns1.kapoho.net

This would then list all the zones defined on the DNS server ns1.kapoho.net, as well as some information (eg when created) about those zones. You could then navigate to a zone (cd \cookham.kapoho.net and enumerate the resource records in a zone.

This is incredibly powerful stuff. You could easily create a wealth of providers such as ones for IAS, IIS, ISA, Exchange, etc. Once created, they can easily be used in MSH command scripts.These should be relatively easy to write (at least the read/only bits!) and could be added easily. And since they are just plug-ins, there is no reason why a particular provider has to come from Microsoft. Cool!

No comments: