Listing User Accounts With WMI
- From: Benjamin <benjamin.dizenhouse@xxxxxxxxx>
- Date: Thu, 22 May 2008 06:23:48 -0700 (PDT)
Hello,
I am trying to list the accounts on a machine with WMI. When I use
the following query:
SELECT * FROM Win32_UserAccount
the results apppear to be all those on the same domain as the computer
I am connected to. I then tried the following query:
SELECT * FROM Win32_UserAccount WHERE LocalAccount = True
This time, the results returned very quickly and appear to be only
local accounts; however, I then tried to list the details for a
specific user using the following:
SELECT * FROM Win32_UserAccount WHERE LocalAccount = True AND Name =
"Administrator"
and the results return extremely slowly (as if it were talking to the
domain controller again). How can I query for the information on a
specific user on a machine and have the results returned quickly?
I have been using wbemtest.exe for testing the queries.
Thanks.
.
- Follow-Ups:
- Re: Listing User Accounts With WMI
- From: Dominic Johnson
- Re: Listing User Accounts With WMI
- Prev by Date: USB finger keys and wmi
- Next by Date: Re: Listing User Accounts With WMI
- Previous by thread: USB finger keys and wmi
- Next by thread: Re: Listing User Accounts With WMI
- Index(es):
Relevant Pages
|