Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Use PSEXEC to get OS Version of Remote machine

Posted on 2009-05-05
4
Medium Priority
?
2,157 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 800 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 1200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

926 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