Solved

Use PSEXEC to get OS Version of Remote machine

Posted on 2009-05-05
4
1,779 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MacOS and programming in React 7 35
Advice in Xamarin 21 79
What are programming codes and how do they work? 7 95
Problem to picture file 20 51
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

777 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