We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Is there a way to get Windows 2003 server roles using WMI or other scripting techniques?

Medium Priority
Last Modified: 2012-05-06
I'm trying to get information regarding a server and am currently trying to figure out how to get the information listed on the "Manage Your Server" screen when you log into a Windows 2003 server machine.

Most interesting is the application roles.  I'd like to know if a server has theDomain controller, DNS, WINS, Print, DHCP, etc application roles installed yet I cannot seem to find a way to get this information.

I know the Win32_ComputerSystem WBEM class has a field called 'Roles' and it lists some of this information, but not all.  For instance, this field mentions nothing about having DNS or WINS.  It does seem to mention print for print servers, etc.  All in all this field doesn't seem to be my one-stop-shop.

Any ideas as to the best way to get this information?

Watch Question

Speshalyst Tech Support professional

this might help you ..


Thanks speshalyst,

Unfortunately that does not help.  That article queries AD for the various FSMO role owners.  If I were looking for FSMO roles that article would indeed help, but what I want is on a local server (even machines not joined to a domain).  

Thanks for the quick response though!
Speshalyst Tech Support professional

WMIC does have some commands to get these details u are looking for ..
for instance..
NICCONFIG will give u the detail about the IP Setting on the NIC Cards
so u shud get the DHCP status / DNS server.. etc..
COMPUTERSYSTEM should give u details about the machine itself..
On a command line.. type WMIC to open the WMI console..
type /? to get a list of all the available switches..
play around.. and u shud be able to find what u  need



Unfortunately I've been going through the available WMI classes to no avail.  I also I think you're misunderstanding what I'm asking. I'm looking to find out "which" server/application roles are installed on the server, i.e.

File server role
Print server role
Application server role
Mail server role
Terminal server role
Remote access/VPN server role
Domain controller role
DNS server role
DHCP server role
Streaming media server role
WINS server role
Windows® SharePoint® Services server role
I have already investigated the COMPUTERSYSTEM as stated in my original post.  The roles listed here do not seem to related to all the available roles above.  Either there is no such WMI class for this information or I'm just blatantly overlooking it!  :).
Thanks though!
Speshalyst Tech Support professional

awwwww.... now i get it ... my bad... i'l keep looking.. will post back if i find something..


Not a problem :).  Thanks for your help!
I dont think that is possible with WMI in Windows 2003 server, there is an added win32 class in Windows 2008 server named Win32_ServerFeature so therefore I dont think its possible in 2003.
There should be other ways to get it, I will try to find something more
/ Mikael

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


That was my fear activephoto.  Thanks for the information.  I was hoping for a unified method to detect these roles in lieu of coming up with a multitude of different methods for each role.  I'm sure I can come up with those alternative methods, so please don't go out of your way searching for me.

I'll leave this open for a day or two to see if anything else comes in, but I suspect activephoto's post is my answer.


While this answer isn't what I was looking for, it seems what I am looking for isn't possible.  Since you state this in your post I can only close this accepting this as the answer.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.