Archive for the ‘Windows 2008’ Category

Viewing Roles and Features with PowerShell

September 8, 2008

I am in the process of deploying a fairly large TS Server Farm with Windows Server 2008. You probably know that in 2008, you have roles and features that can be added to the Operating System. In fact, PowerShell shows up as a feature in 2008.

All of these roles and features are managed through an MMC called ServerManager. It’s fairly intuitive to add or remove roles and features using this tool. There is also a command line version called servermanagercmd.

I just started playing with this and you can use servermanagercmd to install or remove roles, and you can also use it to query what is installed. The cool thing about the query feature is that it can dump it to an XML file.

So check this out

   1: servermanagercmd -q rolesandfeatures.xml
   2: $xml = [xml](gc rolesandfeatures.xml)
   3: $roles = $xml.get_documentelement()
   4: $roles
   5: $roles.role
   6: $roles.role | ? {$_.Installed -eq "true"} | ft DisplayName
   7:  
   8: DisplayName
   9: -----------
  10: Terminal Services
  11: Web Server (IIS)

 

Their is also input functionality built into the tool and I am sure that this is reversible. I’ll keep you posted on how that goes.

 

Andy

Advertisements

Server Core – Preparing Your Desktop

March 14, 2008

I find it amusing that the longest task that occurs the first time you log into Server Core is “Preparing Your Desktop.”

image

I can just here the server now… “where the heck am I going to put that console window anyway?”