List of valid users

  • Thread starter Thread starter Jack Russell
  • Start date Start date
J

Jack Russell

If I am logged on as an administrator how can I get a list of user names
that can log on to this machine?


(and how do you guys find this kind of information?)

Thanks
 
Hi,

You can use the wmi for that. Add a reference to system.management.


Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_Account")

Debug.WriteLine("Accounts")

moReturn = moSearch.Get

For Each mo In moReturn

Try

Debug.WriteLine(mo("Name").ToString)

Catch

End Try

Next


Ken
-----------------------
If I am logged on as an administrator how can I get a list of user names
that can log on to this machine?


(and how do you guys find this kind of information?)

Thanks
 
You can access active Directory

if it is that u want tell me to send u a sample
Doei!!
--
System Engineer
Visual Basic .NET
C#
SQL Server
And happy to learn any other thing :D
 
Ken said:
Hi,

You can use the wmi for that. Add a reference to system.management.


Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_Account")

Debug.WriteLine("Accounts")

moReturn = moSearch.Get

For Each mo In moReturn

Try

Debug.WriteLine(mo("Name").ToString)

Catch

End Try

Next


Ken
-----------------------
If I am logged on as an administrator how can I get a list of user names
that can log on to this machine?


(and how do you guys find this kind of information?)

Thanks
Many thanks, you did not answer the second part of my question!
 
Jack,

Using MSDN, however WMI information is hard to find, so take some time.

(your first search keyword is forever WMI)

I hope this helps something.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top