myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


WQL, MOF and list user and group from Administrators

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> Windows Management Instrumentation >> WQL, MOF and list user and group from Administrators Page: [1]
Login
Message << Older Topic   Newer Topic >>
WQL, MOF and list user and group from Administrators - 7/30/2008 10:53:32 AM   
wjouanne

 

Posts: 1
Score: 0
Joined: 3/18/2005
Status: offline
Hello,
I'm trying to list the member of the Adminstrators group on client according to the Sherry Kissinger Article.
The MOF file is fine except it is unable to get the Localdomain group or the local group from computer.
Does someone meet this kind of trouble ?

Regards
Note: please excuse my poor english this is not my natural language.
Post #: 1
RE: WQL, MOF and list user and group from Administrators - 8/27/2008 8:48:02 AM   
SAPIENScripter

 

Posts: 100
Score: 0
Joined: 5/15/2007
From: SAPIEN Technologies
Status: offline
Can you give me a link to the article?

_____________________________

Jeffery Hicks
Microsoft MVP - Windows PowerShell
http://blog.SAPIEN.com
coming soon: Managing Active Directory with Windows PowerShell: TFM
followme: http://www.twitter.com/jeffHicks

(in reply to wjouanne)
Post #: 2
RE: WQL, MOF and list user and group from Administrators - 8/27/2008 9:30:52 AM   
SAPIENScripter

 

Posts: 100
Score: 0
Joined: 5/15/2007
From: SAPIEN Technologies
Status: offline
Does a script like this help?
strComputer="chaos"
strGroup="Administrators"

set objWMI=GetObject("winmgmts://" & strComputer)

strQuery="Associators of {Win32_Group.Domain='" & strComputer & "',Name='" & strGroup &"'} Where ResultClass=Win32_UserAccount"
WScript.Echo strQuery 
set objSet=objWMI.ExecQuery(strQuery)

for each objItem in objSet
 wscript.echo objItem.domain & "\" & objItem.name
Next



_____________________________

Jeffery Hicks
Microsoft MVP - Windows PowerShell
http://blog.SAPIEN.com
coming soon: Managing Active Directory with Windows PowerShell: TFM
followme: http://www.twitter.com/jeffHicks

(in reply to SAPIENScripter)
Post #: 3
Page:   [1]
All Forums >> [Scripting Technologies] >> Windows Management Instrumentation >> WQL, MOF and list user and group from Administrators Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.203