This is an old revision of the document!
# ---------------------------------------------------------------------------------------------- # # Powershell Get-NICInformation $Rev: 748 $ # (c) 2011 Thomas Maurer. All rights reserved. # created by Thomas Maurer # www.thomasmaurer.ch # www.itnetx.ch # last Update by $Author: tmaurer $ on $Date: 2012-02-24 14:07:36 +0100 (Fr, 24 Feb 2012) $ # ---------------------------------------------------------------------------------------------- # #region [INFO BLOCK] # INFO Write-Host " " -BackgroundColor Black -ForegroundColor White Write-Host " PowerShell Get-NICInformation " -BackgroundColor Black -ForegroundColor White Write-Host " " -BackgroundColor Black -ForegroundColor White Write-Host " by Thomas Maurer " -BackgroundColor Black -ForegroundColor White Write-Host " www.thomasmaurer.ch " -BackgroundColor Black -ForegroundColor White Write-Host " " -BackgroundColor Black -ForegroundColor White #endregion $adapters = Get-WMIObject Win32_PNPSignedDriver | Where-Object { $_.DeviceClass -eq “NET” -and $_.HardWareID -like “*PCI*” } | Sort-Object location foreach ($adapter in $adapters ) { $adapterName = Get-WMIObject Win32_NetworkAdapter | Where-Object { $_.PNPDeviceID -eq $adapter.DeviceID } $adapterConfiguration = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object { $_.index -eq $adapterName.Index } Write-Host ‘Adapter Name :’ $adapterName.NetConnectionID Write-Host ‘PCI BUS :’ $adapter.Location Write-Host ‘MAC Address :’ $adapterName.MACAddress Write-Host ‘GUID :’ $adapterName.GUID Write-Host ‘Adpater Index :’ $adapterName.Index Write-Host ‘Hardwarename :’ $adapterName.Name Write-Host ‘DHCP enabled :’ $adapterConfiguration.DHCPEnabled Write-Host ‘IP Address :’ $adapterConfiguration.IPAddress Write-Host ‘Subent :’ $adapterConfiguration.IPSubnet Write-Host ‘Default Gateway :’ $adapterConfiguration.DefaultIPGateway Write-Host }