Solved

Auditing PC's across a Network

Posted on 2008-06-16
5
479 Views
Last Modified: 2013-11-07
I have the need to maintain an audit of my Company's PC's across a Wide Area Network.  I need to retireve information from each PC/Laptop such as IP Address, User Name, User Full Name, Operating System and Service Pack, RAM, MS Office Version, CPU, Date Last Used, etc.  Does anyone have an example of how to do this in VB.NET (it would run as a scheduled task from a Windows 2003 server).
0
Comment
Question by:bertpet
  • 3
5 Comments
 
LVL 7

Expert Comment

by:CorruptedLogic
ID: 21798369
You could use something as simple as a batch file which calls msinfo32 and outputs to a text file based on the username. Something along the lines of

start msinfo32 /report c:\%username%.txt

You can play around with the switches to pull out only what you need.

HTH
0
 
LVL 10

Expert Comment

by:athapa
ID: 21799203
Use WMI to query informations you need from remote machines.

Use Directory Services to iterate through all available domains and then iterate through all available machines within each domains. Once you have a machine name then you can query those machines using WMI.

0
 
LVL 10

Expert Comment

by:athapa
ID: 21799211
0
 

Author Comment

by:bertpet
ID: 21877854
OK I have solved part of  this using ManagementObjectServer after all of the preliminaries with:
oWMISet = New ManagementObjectSearcher("\\" & strComputer & "\root\cimv2", "SELECT * FROM Win32_NetworkLoginProfile") AND then

 For Each objMgmt In oWMISet.Get
      strUserName = objMgmt("name").ToString()
 Next

This returns me the user name of the person logged into the nominated PC.  What I would like to know is what other information is available within this context, ie, if objMgmt("name").ToString() returns the user name then what syntax returns the User Full Name - is it objMgmt("fullname").ToString() OR objMgmt("userfullname").ToString().  How do you find out what other information is available using this context and what they are called ("name", "fullname", etc) - there seems to be a lack of clear information on the Internet on this?
Please help.
0
 
LVL 10

Accepted Solution

by:
athapa earned 500 total points
ID: 21880760
FullName will return fullname.

Check this link for a list of other properties available at that context.

http://www.dx21.com/SCRIPTING/WMI/SUBCLASS.ASP?CID=299

There are some WMI browsers which lets you see what classes/properties are available in various WMI name spaces. Here is one

http://www.shareup.com/WMI_Explorer-download-45595.html

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question