Added modules from WinAPI

This commit is contained in:
Lifailon 2024-01-29 23:41:19 +03:00
parent 56da334ea2
commit b709d7e96b
24 changed files with 657 additions and 125 deletions

View file

@ -0,0 +1,13 @@
function Get-NetIpConfig {
Get-CimInstance -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=$true |
Select-Object Description,
@{Label="IPAddress"; Expression={[string]($_.IPAddress)}},
@{Label="GatewayDefault"; Expression={[string]($_.DefaultIPGateway)}},
@{Label="Subnet"; Expression={[string]($_.IPSubnet)}},
@{Label="DNSServer"; Expression={[string]($_.DNSServerSearchOrder)}},
MACAddress,
DHCPEnabled,
DHCPServer,
DHCPLeaseObtained,
DHCPLeaseExpires
}