Add list-nic.ps1

This commit is contained in:
Markus Fleschutz 2022-10-04 15:25:06 +02:00
parent b12f9c9f45
commit f8e73d32a8

20
Scripts/list-nic.ps1 Normal file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Lists NIC details
.DESCRIPTION
This PowerShell script lists the details of the installed network interfaces.
.EXAMPLE
PS> ./list-nic
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
Get-WmiObject -Class Win32_NetworkAdapterConfiguration
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}