Solved

WMI not finding Domain Local on Servers Local Administrators Group

Posted on 2010-08-17
3
1,311 Views
Last Modified: 2013-11-08
I am running the following WMI query from a domain account which is in the local Administrators group on my server:

select * from Win32_GroupUser where GroupComponent = "Win32_Group.Domain='WIN2000SERVER1',Name='Administrators'"

and it returns most of the members of the group. However, it doesn't return domain groups which are "Domain Local" groups.  It returns "Global" groups correctly and all users and local groups.

Any ideas?
0
Comment
Question by:idealsw
  • 2
3 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 33460450
Hi, what you have should work, but I prefer to make the server and group a variable, like this

strServer = "SERVER"
strGroup  = "Administrators"
strNameSpace = "root\cimv2"
strDomain = "DOMAIN"
strUserName = "administrator"
strPassword = "password"
Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objWbemLocator.ConnectServer(strServer, strNameSpace, strDomain & "\" & strUserName, strPassword)
objWMIService.Security_.AuthenticationLevel = WbemAuthenticationLevelPktPrivacy
Set colGroups = objWMIService.ExecQuery("Select * FROM Win32_GroupUser WHERE GroupComponent = 'Win32_Group.Domain=""" & strServer & """,Name=""" & strGroup & """'")
But, your problem relates to this article:
http://support.microsoft.com/kb/320489
However, even if I run against a 2003 server, the Domain Local group is still not listed, although I have not  installed the hotfix on that server.
Even running *from* a 2003 server *against* another 2003 server, it doesn't show Domain Local either....perhaps install the hotfix and see if that helps you.
Regards,
Rob.
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 33460465
Actually, here's the 2003 Server article:
http://support.microsoft.com/kb/940527/
Regards,
Rob.
0
 
LVL 1

Author Comment

by:idealsw
ID: 33463108
Thank you. I'll get the hotfixes.
Best wishes
Bish
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

823 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