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
The Memory-Optimization Hoax

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

VMware and the Future of Virtualization

What's next for virtualization and business IT? Windows IT Pro senior editor Jeff James speaks with VMware President and CEO Diane Greene on the future of virtualization technology. ...

What service packs and fixes are available?

...


Windows OSs Whitepapers Replay for Exchange: Enterprise Protection and an Affordable Price

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 Disaster Recovery and Backup

A Guide to Windows Certification and Public Keys

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.


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Critical Challenges of ESI & Email Retention
Are you storing too much electronic information? Get expert legal advice and better understanding of what you are required to do as an IT professional.

Become a fan of Windows IT Pro on Facebook!
Join us on Facebook and be a fan of Windows IT Pro!

Sustainable Compliance: Are You Having a Resource Crisis?
Read this white paper to examine trends in compliance and security management and review approaches to reducing the cost and operational burden of compliance.

Rev Up Your IT Know-How with Our Recharged Magazine!
The improved Windows IT Pro provides trusted IT content with an enhanced new look and functionality! Get comprehensive coverage of industry topics, expert advice, and real-world solutions—PLUS access to over 10,000 articles online. Order today!

Get It All with Windows IT Pro VIP
Stock your IT toolbox with every solution ever printed in Windows IT Pro and SQL Server Magazine plus bonus Web-exclusive content on hot topics. Subscribe to receive the VIP CD and a subscription to your choice of Windows IT Pro or SQL Server Magazine!



Order Your Fundamentals CD Today!
Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.
Windows IT Pro Home Register About Us Affiliates / Licensing Media Kit Contact Us/Customer Service  
SQL Connected Home IT Library SuperSite FAQ Wininfo News
Europe Edition Office & SharePoint Pro Windows Dev Pro Windows Excavator 
 
 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