Solved

Use PSEXEC to get OS Version of Remote machine

Posted on 2009-05-05
4
1,976 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:msyed1
ID: 24309135
This was the question I had asked earlier:
http://www.experts-exchange.com/Programming/Languages/Q_24366041.html 
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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.
Make the most of your online learning experience.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

617 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