Help with WMI

  • Thread starter Thread starter Jim Scheffler
  • Start date Start date
J

Jim Scheffler

Hello Group,

Could someone point me to an explanation of this statement,

Dim Domain As String = Console.ReadLine()
Dim UserQuery As String = "SELECT * FROM Win32_UserAccount " & _
"WHERE Domain='" & Domain & "'"
Dim Query As New ManagementObjectSearcher(UserQuery)

The part I don't understand is "WHERE Domain='" & Domain & "'"

Thanks for any help,

Jim Scheffler
 
Hi Jim,

the domain is the network you log on to, e.g. MyCompany, where you are, lets
say, (e-mail address removed)
So the WMI query selects all the people that are in that domain (company):

SELECT * FROM WIN32_UserAccount WHERE Domain='MyCompany'
 
FYI, there is a newsgroup for WMI and dotnet:
microsoft.public.dotnet.framework.wmi
 
Back
Top