Solved

WMI not finding Domain Local on Servers Local Administrators Group

Posted on 2010-08-17
3
1,317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

752 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