mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-16 18:06:45 +02:00
Add list-nic.ps1
This commit is contained in:
parent
b12f9c9f45
commit
f8e73d32a8
20
Scripts/list-nic.ps1
Normal file
20
Scripts/list-nic.ps1
Normal 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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user