Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

which WMI WIN32 class has the information that netstat can provide

2,179 views
Skip to first unread message

James

unread,
Feb 28, 2013, 12:46:48 PM2/28/13
to
hi all,

I am writing a vbscript to do WMI query on remote host (win2008, win 7, winxp , etc)
I want to use WMI query to get the similar results as if I run
"tasklist" and "netstat -ano" commands locally on the remote host

For "tasklist", the Win32_Process class has all the information I need.

However, I could not find a WMI Win32 class that can provide information as if
I run "netstat -ano".

Has someone encountered similar problem before?

Thanks!

James

GS

unread,
Mar 1, 2013, 12:24:20 AM3/1/13
to
James explained :
You need to specify the name of the remote host computer when you pass
your query. Beyond that there's no special operators required so just
use same code as you would running the script on a local machine.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


james.z...@gmail.com

unread,
Mar 1, 2013, 1:32:55 PM3/1/13
to
On Friday, March 1, 2013 12:24:20 AM UTC-5, GS wrote:
> James explained : > hi all, > > I am writing a vbscript to do WMI query on remote host (win2008, win 7, winxp > , etc) I want to use WMI query to get the similar results as if I run > "tasklist" and "netstat -ano" commands locally on the remote host > > For "tasklist", the Win32_Process class has all the information I need. > > However, I could not find a WMI Win32 class that can provide information as > if I run "netstat -ano". > > Has someone encountered similar problem before? > > Thanks! > > James You need to specify the name of the remote host computer when you pass your query. Beyond that there's no special operators required so just use same code as you would running the script on a local machine. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion

Thanks Garry.
I could NOT find any WMI query that can give similar output as if
I run "netstat -ano". I am looking for a WMI WIN32 class that can provide
those information.

GS

unread,
Mar 2, 2013, 1:11:16 AM3/2/13
to
After serious thinking james.z...@gmail.com wrote :
What is "netstat -ano"?

Mayayana

unread,
Mar 2, 2013, 9:30:29 AM3/2/13
to
| What is "netstat -ano"?
|

http://en.wikipedia.org/wiki/Netstat

For monitoring network activity.

James: I don't see why you need WMI if netstat does
the job. Most of WMI is just clunky wrappers around
better functionality elsewhere. But I also don't work
with networks, so I'm not familiar with those operations.

Looking at the WMI CHM file, there are a number of
Win32_Network* classes. I'd guess they're going
to relate to the local connection rather than the network
status. WMI, after all, is for managing a Windows OS
configuration.


GS

unread,
Mar 2, 2013, 9:29:56 PM3/2/13
to
Mayayana brought next idea :
Thanks! I'll follow that up...

James

unread,
Mar 6, 2013, 10:17:13 AM3/6/13
to
On Saturday, March 2, 2013 9:30:29 AM UTC-5, Mayayana wrote:
> | What is "netstat -ano"? | http://en.wikipedia.org/wiki/Netstat For monitoring network activity. James: I don't see why you need WMI if netstat does the job. Most of WMI is just clunky wrappers around better functionality elsewhere. But I also don't work with networks, so I'm not familiar with those operations. Looking at the WMI CHM file, there are a number of Win32_Network* classes. I'd guess they're going to relate to the local connection rather than the network status. WMI, after all, is for managing a Windows OS configuration.

Thanks Mayayana.
The reason I have to do WMI is to get the results of "netstat -ano" from a group of REMOTE computers. Instead of running the netstat command on the remote machine and open Windows firewall rules to copy the result files over to local machine, I want to use WMI remote query to achieve this.
0 new messages