So I’ve installed beta 3 of Windows Server “Longhorn” from DVD. It seemed to go pretty quickly, in fact I popped to the canteen for a spot of lunch and when I came back it was ready to go. So much for seeing the install experience for myself.
Anyway, Server Manager now has its own little command line utility, ServerManagerCmd. This utility (along with its GUI version) allows you to query, install and remove roles and features from the server.
For example if I wanted to install MSMQ I could use
ServerManagerCmd -install “MSMQ”
I can also capture the install actions in an XML document like this:
<ServerManagerConfiguration Action=”Install” xmlns=”http://schemas.microsoft.com/sdm/Windows/ServerManager/Configuration/2007/1″>
ServerManagerCmd -installPath installthese.xml
If I wanted to find out what roles and features are installed I could use
and to save it to an XML file
ServerManagerCmd -query currentconfig.xml
Viewing the currentconfig.xml file gives you all the information you need to figure out which roles and features are installed on a server.
Now, me being me, what I really want to do is take the output from the query command on one machine, and use it as the input file on another machine. Although the schemas for input and output are essentially the same, you need to do some translation between the 2 file formats.
Sounds like something an XSLT could do for us. Out comes Altova MapForce and seconds later a XSLT is created. (attached)
Now before you go running and using this all over the place – a word of warning. It runs great on my machine. (Did I really just write that????). No honestly, it mostly does the job. For some reason it insists on adding the remote administration tools regardless of what I tell it. I’m figuring I have something wrong. I have also not tested every combination of every role and feature, but since this entire exercise is the result of one of those sidetracked moments, I reserve the right to get most of the way there to prove a point. Feel free to take the attached XSLT and improve it. If you blog it, link back so you can share your achievement.
THIS POSTING IS PROVIDED “AS IS” WITH NO WARRANTIES, AND CONFERS NO RIGHTS