Solved

Use PSEXEC to get OS Version of Remote machine

Posted on 2009-05-05
4
1,749 Views
Last Modified: 2013-11-10
I recently asked a question regarding how to login (programatically) to a remote machine and find out the remote machine's OS version.  'arnold' had replied.  But then we had decided we didn't need it.  Anyway now, I have been asked to use "psexec' to retrieve the OS version of a bunch of remote machines which in my program will be in an arraylist.  My program is a console application in VB.Net.

I have never done anything like this.  I need help from someone who can show me how to read from an arraylist of computer names, use 'psexec' to login to the remote machine and run a command that would return the OS Version of that machine.  I would really appreciate it.  
0
Comment
Question by:msyed1
  • 2
4 Comments
 

Author Comment

by:msyed1
ID: 24309135
0
 
LVL 15

Assisted Solution

by:veedar
veedar earned 200 total points
ID: 24309631
Also check out psinfo from the same maker of psexec and part of the pstools suite. It will give you OS version plus other info.
0
 
LVL 4

Accepted Solution

by:
daluu earned 300 total points
ID: 24311449
veedar has a good suggestion to use psinfo.exe. If you want a more integrated solution, you might want to look into WMI (Windows Management Instrumentation) with .NET.

WMI is easier to use with VBScript I think, but it will work with .NET, C#, and VB.NET. You just need to do some research on using WMI with .NET.

Here's a reference on using WMI to get OS info in VBScript. The API calls for the .NET equivalent would be similar, though syntax would be slightly different.

http://www.computerperformance.co.uk/vbscript/wmi_secrets.htm#Example_2_-_WMI_Script_to_Obtain_Information_about_the_Operating_System_
0
 

Author Closing Comment

by:msyed1
ID: 31578229
veedar, daluu: Since I don't know WMI, I did it using a .Net Console application.  Opened a DOS prompt from the program and ran the PSINFO, then parsed the results.  Thanks.  Also, please see if you can help me with my new Question that I just opened:
http://www.experts-exchange.com/Security/Misc/Q_24389330.html    
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now