Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


May 2008

Control Windows Server 2008 Roles and Features

Eschew the Server Manager GUI and reach for the command line
RSS
Subscribe to Windows IT Pro | See More Tips Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Executive Summary:

Windows Server 2008 has abandoned the familiar Computer Management console, and you’re left with the unwieldy Server Manager GUI tool. But if you’re faced with the prospect of rolling out dozens, hundreds, or thousands of servers, your best bet is to use the tool’s less celebrated command-line brethren, ServerManagerCmd, Ocsetup, and Oclist.

By the time you read this column, Microsoft will have released Windows Server 2008. Even if you’ve decided not to immediately upgrade to the new server OS, y probou’reably setting up a few test servers to try it out. And as you tinker with these fresh Server 2008 systems, you’ll begin making observations.

First, Computer Management is gone! Right-clicking Computer and choosing Manage brings up not the familiar Computer Management console but rather the new Server Manager console. And if you try to use Server Manager to add, say, the DNS Server service, you’ll see that you’re now dealing with roles and features. Second, you can no longer use Control Panel’s Add/Remove Windows Components applet. It doesn’t exist in the new OS, so you’ll be forced to use the newfangled Server Manager tool.

Pshaw, I say. Eventually, you’re going to be faced with the prospect of rolling out dozens, hundreds, or thousands of servers and—let’s all say it together—you’re not going to use the Server Manager console to do it. Instead, let me introduce you to the tool’s less celebrated command-line brother, ServerManagerCmd (servermanagercmd. exe), and its cousins Ocsetup (ocsetup. exe) and Oclist (oclist.exe). ServerManagerCmd works only if you’re running the “full” (GUI-equipped) version of Server 2008. (I’ll get to the Server Core commands in a bit.)

ServerManagerCmd
Working from an elevated command prompt (as always) in Server 2008, type

servermanagercmd -query

This simplest of ServerManagerCmd commands will display several screens that show all the add-on capabilities that your server currently has and hasn’t enabled. (I say “capabilities” because Server 2008 breaks them into roles and features, and I haven’t figured out the difference. Given that DNS is a role and WINS is a feature, can we assume that roles are cool and features are less so?) One such line might look like

[ ] DNS Server [DNS]

where DNS Server means that the server has the potential to become a DNS server, the empty opening brackets mean that you haven’t enabled the service (if you did enable it, an X would appear between the brackets), and—most important—[DNS] informs ServerManager- Cmd that you want to perform a task involving the DNS server service.

That terminology is the key to making this server capable of acting as a DNS server:

servermanagercmd -install dns

Notice that ServerManagerCmd recognizes the DNS role but is case-insensitive.

Ocsetup and Oclist
Now, if you’re setting up DNS on a Server Core installation of Server 2008 rather than a full installation, you’ll find no ServerManagerCmd tool; instead, to list the capabilities you do and don’t have installed, you can type

oclist

You’ll see output similar to that which ServerManager- Cmd -query provides, but the official names for the roles and features are lengthier. For example, the DNS line looks like

Not Installed:DNS-Server-Core-Role

To install a role or feature, just use Ocsetup, followed by the role or feature’s name. To install DNS, for example, you’d type

ocsetup DNS-Server-Core-Role

Note that you don’t need an -install option. Ocsetup only installs and uninstalls; it has no option like -query because the separate Oclist program fills that need.

You’ll also find that, like many Server Core– specific commands, Ocsetup is one of those “strong, silent type” commands. If you’ve typed an Ocsetup command with correct syntax, your only response is another command prompt. Be aware, though, that just because you’ve gotten another command prompt doesn’t mean that Server Core has finished installing the DNS server role. Occasionally, I’ve gotten in trouble by assuming that. Now, I use the belt-andsuspenders technique of running Oclist on a Server Core system to be certain that my desired role has been installed.

Command-Line Power
Honestly, would you rather click through Server Manager to install DNS when you can just type

servermanagercmd -install dns

from the command line? Of course not! So go out and buy one of those comfortable keyboards, because Server 2008 is here!

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Escape From Yesterworld

Kevin points you to the funniest SQL Server website ever! ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

IT Connections
Dive into the new Microsoft platforms and products you implement and support with the experts from Microsoft, TechNet Magazine, Windows ITPro and industry gurus. There are 70+ sessions and interactive panels with networking opportunities.

Attention User Group Leaders...
Announcing the eNews Generator—a FREE HTML e-newsletter builder for user group leaders. Build your HTML and text e-newsletters in minutes and add Windows IT Pro & SQL Server Mag articles alongside your own message!.

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Get SQL Server 2008 at WinConnections
Don’t miss Microsoft Exchange and Windows Connections conferences, the premier events for Microsoft IT Professionals in Las Vegas, November 10-13. Every attendee will receive a copy of SQL Server 2008 Standard Edition with one CAL.



Interested in Email Encryption?
Read about the advantages of identity-based encryption in this free report.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing