Below is small snippet that gives you info about all the network cards installed on your system.
# Get all network adapters
$networkAdapters = Get-NetAdapter
# Output information about each network adapter
foreach ($adapter in $networkAdapters) {
Write-Output "Name: $($adapter.Name)"
Write-Output "Description: $($adapter.Description)"
Write-Output "Interface Index: $($adapter.InterfaceIndex)"
Write-Output "MAC Address: $($adapter.MacAddress)"
Write-Output "Status: $($adapter.Status)"
Write-Output "-----------------------------"
}
As you know, $adapter used above can be used to get more and more details you want.
Hope this was quick and easy.
Thanks!
No comments:
Post a Comment