Jump to content

Network Adapter Info


Trong
 Share

Recommended Posts

Network Adapter Info use WMI (Windows Management Instrumentation)

 Screen_Shot.png

Features: 

  • Show information network card.
  • Easily copy information, for copy just click on the line want to copy.
  • Notifications connection, connection loss.
  • Supports exporting information to file (CSV/INI format).

Run: 

Export to file INI format:   NetStatus.exe "PathFile.INI"   

Export to file CSV format:  NetStatus.exe "PathFile.CSV" CSV
Export to file CSV format:  NetStatus.exe "PathFile.CSV" /CSV
Export to file CSV format:  NetStatus.exe "PathFile.CSV" --CSV


Binary and Source: 

 

Edited by VIP
fix bugs and add features

Regards,
 

Link to comment
Share on other sites

Thanks for this worthwhile utility script.  I was able to get the result I expected on the first PC I tested (shown below).

However, on a second PC that had its network adapter disabled by the control panel settings, the script got an "incorrect number of subscripts" error.  I inserted an _ArrayDisplay() statement.  The array shows only one row with 0 and 5 in the columns. 

Can your utility be made to show all adapters in the PC, even those that are disabled?

Thanks for any help you can give.

5716f50a50190_ArrayContents.PNG.0646a628

Link to comment
Share on other sites

On 20/4/2016 at 10:21 AM, qwert said:

Thanks for this worthwhile utility script.  I was able to get the result I expected on the first PC I tested (shown below).

However, on a second PC that had its network adapter disabled by the control panel settings, the script got an "incorrect number of subscripts" error.  I inserted an _ArrayDisplay() statement.  The array shows only one row with 0 and 5 in the columns. 

Can your utility be made to show all adapters in the PC, even those that are disabled?

Thanks for any help you can give.

5716f50a50190_ArrayContents.PNG.0646a628

Show all adapters in the PC (no incude special Adapters) , 
but if Adapter disabled then only get a name 
can't get more info !

Edited by VIP

Regards,
 

Link to comment
Share on other sites

try this:

#include <array.au3>

$iPid = run("powershell get-netadapter -IncludeHidden -verbose" , "" , @SW_HIDE , $stdout_child)

$sOutput = ""

     While 1
        $sOutput &= StdoutRead($iPID)
        If @error Then ExitLoop
    WEnd


ProcessClose($iPID)

$aOut = stringsplit($sOutput , @LF , 2)

_ArrayDisplay($aOut)

 

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

10 minutes ago, iamtheky said:

try this:

#include <array.au3>

$iPid = run("powershell get-netadapter -IncludeHidden -verbose" , "" , @SW_HIDE , $stdout_child)

$sOutput = ""

     While 1
        $sOutput &= StdoutRead($iPID)
        If @error Then ExitLoop
    WEnd


ProcessClose($iPID)

$aOut = stringsplit($sOutput , @LF , 2)

_ArrayDisplay($aOut)

 

Only get MacAddress, not have IP info. And can't run if not install/have PowerShell

Regards,
 

Link to comment
Share on other sites

20 minutes ago, VIP said:

And can't run if not install/have PowerShell

What Version of Windows are you using that doesn't come with PS by default?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

On 20/4/2016 at 11:49 PM, BrewManNH said:

What Version of Windows are you using that doesn't come with PS by default?

Windows XP and Windows 7/8/8.1/10 (Lite version - very popular) not have PS by default

And Get-NetAdapter Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2 and higher

Edited by VIP

Regards,
 

Link to comment
Share on other sites

I just moved to win10. lots of good fun in powershell 5.0

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

get-netipaddress

Though, that will be the return of adapters that are not disabled.

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Thanks for the update.  I now have 11 devices identified on one of my PCs.  Here's a sampling:

WAN Miniport (SSTP)
WAN Miniport (IKEv2)
:
Bluetooth Device (Personal Area Network)
:
Intel(R) 82578DC Gigabit Network Connection

But only two of them have any information listed for them.  Should it be finding 11 Network Adapters?  Can it be made to find only the 2 or 3 actual hardware devices?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...