Hi All,
I am using WMI to retrieve some user account info. Getting users is easy using the query:
Getting the groups that a user is member of is a bit trickier, eg:
user: Joe
member of: Administrators, Users
I'm using the following query, where myDomain is the Machine Name and theUser is the User Name:
I've seen this in a number of examples but it's not working for me. The query is accepted but seem to return nothing. Any Hints?
Thanks
I am using WMI to retrieve some user account info. Getting users is easy using the query:
VB.NET:
"SELECT * FROM Win32_UserAccount"
Getting the groups that a user is member of is a bit trickier, eg:
user: Joe
member of: Administrators, Users
I'm using the following query, where myDomain is the Machine Name and theUser is the User Name:
VB.NET:
"SELECT * FROM Win32_GroupUser " + _
"WHERE PartComponent = ""Win32_UserAccount.Domain='" + _
myDomain + "',Name='" + theUser + "'"""
Thanks