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

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?

TIA,
Mcdonamw
LVL 1
FADVMSAdminAsked:
Who is Participating?
 
Mikael JanssonCommented:
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
0
 
speshalystCommented:
this might help you ..
http://support.microsoft.com/kb/235617 
0
 
FADVMSAdminAuthor Commented:
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!
McDonaMW
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
speshalystCommented:
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
 
0
 
FADVMSAdminAuthor Commented:

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!
0
 
speshalystCommented:
awwwww.... now i get it ... my bad... i'l keep looking.. will post back if i find something..
0
 
FADVMSAdminAuthor Commented:
Not a problem :).  Thanks for your help!
0
 
FADVMSAdminAuthor Commented:
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.
0
 
FADVMSAdminAuthor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.