[python-win32] Win32_GroupUser

James Matthews nytrokiss at gmail.com
Tue Nov 14 05:01:53 CET 2006


There should be a central site with all this information!
On 11/13/06, Tim Golden <mail at timgolden.me.uk> wrote:
>
> Tim Roberts <timr <at> probo.com> writes:
>
> >
> > Tim Golden wrote:
> > > | Working off a large-ish domain, I can't seem to find a form of:
> > > |
> > > | import wmi
> > > | conn = wmi.WMI ()
> > > | stuff = conn.Win32_GroupUser ()
> > > |
> > > | ... that doesn't enumerate the entire domain.
> > >
> > > I'm going to assume that you didn't intend the
> > > double-negative in the above.
> > >
> >
> > Actually, I think he did.  Everything he tried enumerated the entire
> > domain, which is not what he wanted.  He wanted to query a subset only.
>
> Ah yes, my misunderstanding. Thanks for pointing out.
>
> > What he posted was:
> >
> > conn.Win32_GroupUser (GroupComponent = "Win32_Group.SID=sid_number")
> >
> > Suggesting, perhaps, that he wanted only the users within
> > a group with a given SID.
>
> I imagine you're right. Hopefully my example gave
> a way of doing that, but I'll just repost slightly
> here:
>
> <code>
> import wmi
> c = wmi.WMI ()
> sid_number = "whatever"
> group = c.Win32_Group (SID=sid_number)
> #
> # and then as before, using group.associators (...)
> #
>
> </code>
>
> TJG
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>



-- 
http://www.goldwatches.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20061113/c1c4685a/attachment.htm 


More information about the Python-win32 mailing list