Add modules from WinAPI (process managment and cim hardware)
This commit is contained in:
parent
3514ec6e3d
commit
bbfdb5d61f
11 changed files with 243 additions and 0 deletions
8
Scripts/Get-NetAdapter.psm1
Normal file
8
Scripts/Get-NetAdapter.psm1
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function Get-NetAdapter {
|
||||
Get-CimInstance -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=$true | Select-Object Description,
|
||||
DHCPEnabled,DHCPLeaseObtained,DHCPLeaseExpires,DHCPServer,
|
||||
@{Label="IPAddress"; Expression={[string]($_.IPAddress)}},
|
||||
@{Label="DefaultIPGateway"; Expression={[string]($_.DefaultIPGateway)}},
|
||||
@{Label="IPSubnet"; Expression={[string]($_.IPSubnet)}},
|
||||
MACAddress
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue