You are on page 1of 1

Copy/paste the following in CMD prompt:

@echo off
PowerShell ^
$Tot=((Get-NetAdapter -Physical ^| Where Status -eq 'Up') ^| Measure-
Object).Count; ^
if ($Tot -ne 0) {Write-Host """`n --- Network - Current Connection(s) [$Tot] -
Sorted by [Name] ---`n"""} else {Write-Host """`n --- NO Network - Current
Connection(s) Available ---"""; exit 1; goto :Network_Interfaces_Drivers}

PowerShell (Get-NetAdapter -Physical ^| Where Status -eq 'Up' ^| Sort-Object -


Property Name ^| Format-Table -AutoSize ^
@{L='Name' ;E={;if([string]::IsNullOrWhiteSpace($_.Name))
{'-'} else {$_.Name}}}, ^
@{L='Interface
Description';E={;if([string]::IsNullOrWhiteSpace($_.InterfaceDescription)) {'-'}
else {$_.InterfaceDescription}}}, ^
@{L='Index' ;E={;if([string]::IsNullOrWhiteSpace($_.ifIndex))
{'-'} else {$_.ifIndex}}}, ^
@{L='Status' ;E={;if([string]::IsNullOrWhiteSpace($_.Status))
{'-'} else {$_.Status}}}, ^
@{L='Link Speed' ;E={;if([string]::IsNullOrWhiteSpace($_.LinkSpeed))
{'-'} else {$_.LinkSpeed}};A='Right'} ^| ^
Out-String -Width 1000).Trim("""`r`n""") >> %Temp%\A.txt
for /f "delims=" %%i in (%Temp%\A.txt) do echo %%i
del %Temp%\A.txt

echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & Exit

You might also like