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

Posted on 2009-02-12
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?

Question by:FADVMSAdmin
  • 5
  • 3
LVL 16

Expert Comment

ID: 23626956
this might help you ..

Author Comment

ID: 23627003
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!
LVL 16

Expert Comment

ID: 23627133
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.


Author Comment

ID: 23627302

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!
LVL 16

Expert Comment

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

Author Comment

ID: 23627472
Not a problem :).  Thanks for your help!

Accepted Solution

activephoto earned 750 total points
ID: 23630647
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

Author Comment

ID: 23633590
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.

Author Closing Comment

ID: 31546323
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.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question