Skip to content

Commit 2d1c346

Browse files
committed
Add network configuration to the reporting script
1 parent f5f35b3 commit 2d1c346

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Report.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ Get-ComputerInfo > "${Reports}\computer_info.txt"
6969
Show-Output "Creating report of SSD/HDD SMART data."
7070
Get-Disk | Get-StorageReliabilityCounter | Select-Object -Property "*" > "${Reports}\smart.txt"
7171

72+
Show-Output "Creating report of network configuration."
73+
Get-NetIPConfiguration | Select-Object `
74+
"InterfaceAlias",
75+
"InterfaceDescription",
76+
@{n="MacAddress"; e={$_.NetAdapter.MacAddress}},
77+
@{n="MacAddressColon"; e={$_.NetAdapter.MacAddress.Replace("-", ":")}},
78+
@{n="IPv4Address"; e={$_.IPv4Address -join ", "}},
79+
@{n="IPv6Address"; e={$_.IPv6Address -join ", "}},
80+
@{n="IPv4DefaultGateway"; e={$_.IPv4DefaultGateway.NextHop -join ", "}},
81+
@{n="IPv6DefaultGateway"; e={$_.IPv6DefaultGateway.NextHop -join ", "}},
82+
@{n="DNSServer"; e={$_.DNSServer.ServerAddresses -join ", "}} > "${Reports}\network_configuration.txt"
83+
7284
Show-Output "Creating report of Plug and Play devices."
7385
Get-PnPDevice > "${Reports}\pnp_devices.txt"
7486

0 commit comments

Comments
 (0)