@@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
55 . DESCRIPTION
66 Documents the configuration of VMware vSphere infrastucture in Word/HTML/Text formats using PScribo.
77 . NOTES
8- Version: 1.3.0
8+ Version: 1.3.1
99 Author: Tim Carman
1010 Twitter: @tpcarman
1111 Github: tpcarman
@@ -2422,7 +2422,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
24222422 # endregion ESXi Host Physical Adapters
24232423
24242424 # region ESXi Host Cisco Discovery Protocol
2425- $VMHostNetworkAdapterCDP = $VMHost | Get-VMHostNetworkAdapterCDP | Where-Object { $_.Status -eq ' Connected' } | Sort-Object Device
2425+ $VMHostNetworkAdapterCDP = $VMHost | Get-VMHostNetworkAdapterDP | Where-Object { $_.Status -eq ' Connected' } | Sort-Object Device
24262426 if ($VMHostNetworkAdapterCDP ) {
24272427 Section - Style Heading5 ' Cisco Discovery Protocol' {
24282428 Paragraph " The following section details the CDP information for $VMHost ."
@@ -2477,6 +2477,61 @@ function Invoke-AsBuiltReport.VMware.vSphere {
24772477 }
24782478 # endregion ESXi Host Cisco Discovery Protocol
24792479
2480+ # region ESXi Host Link Layer Discovery Protocol
2481+ $VMHostNetworkAdapterLLDP = $VMHost | Get-VMHostNetworkAdapterDP | Where-Object { $null -ne $_.ChassisId } | Sort-Object Device
2482+ if ($VMHostNetworkAdapterLLDP ) {
2483+ Section - Style Heading5 ' Link Layer Discovery Protocol' {
2484+ Paragraph " The following section details the LLDP information for $VMHost ."
2485+ if ($InfoLevel.VMHost -ge 4 ) {
2486+ foreach ($VMHostNetworkAdapter in $VMHostNetworkAdapterLLDP ) {
2487+ Section - Style Heading5 " $ ( $VMHostNetworkAdapter.Device ) " {
2488+ $VMHostLLDP = [PSCustomObject ]@ {
2489+ ' Chassis ID' = $VMHostNetworkAdapter.ChassisId
2490+ ' Port ID' = $VMHostNetworkAdapter.PortId
2491+ ' Time to live' = $VMHostNetworkAdapter.TimeToLive
2492+ ' TimeOut' = $VMHostNetworkAdapter.TimeOut
2493+ ' Samples' = $VMHostNetworkAdapter.Samples
2494+ ' Management Address' = $VMHostNetworkAdapter.ManagementAddress
2495+ ' Port Description' = $VMHostNetworkAdapter.PortDescription
2496+ ' System Description' = $VMHostNetworkAdapter.SystemDescription
2497+ ' System Name' = $VMHostNetworkAdapter.SystemName
2498+ }
2499+ $TableParams = @ {
2500+ Name = " Network Adapter $ ( $VMHostNetworkAdapter.Device ) LLDP Information - $VMHost "
2501+ List = $true
2502+ ColumnWidths = 50 , 50
2503+ }
2504+ if ($Report.ShowTableCaptions ) {
2505+ $TableParams [' Caption' ] = " - $ ( $TableParams.Name ) "
2506+ }
2507+ $VMHostLLDP | Table @TableParams
2508+ }
2509+ }
2510+ } else {
2511+ BlankLine
2512+ $VMHostLLDP = foreach ($VMHostNetworkAdapter in $VMHostNetworkAdapterLLDP ) {
2513+ [PSCustomObject ]@ {
2514+ ' Adapter' = $VMHostNetworkAdapter.Device
2515+ ' Chassis ID' = $VMHostNetworkAdapter.ChassisId
2516+ ' Port ID' = $VMHostNetworkAdapter.PortId
2517+ ' Management Address' = $VMHostNetworkAdapter.ManagementAddress
2518+ ' Port Description' = $VMHostNetworkAdapter.PortDescription
2519+ ' System Name' = $VMHostNetworkAdapter.SystemName
2520+ }
2521+ }
2522+ $TableParams = @ {
2523+ Name = " Network Adapter LLDP Information - $VMHost "
2524+ ColumnWidths = 11 , 19 , 16 , 19 , 18 , 17
2525+ }
2526+ if ($Report.ShowTableCaptions ) {
2527+ $TableParams [' Caption' ] = " - $ ( $TableParams.Name ) "
2528+ }
2529+ $VMHostLLDP | Table @TableParams
2530+ }
2531+ }
2532+ }
2533+ # endregion ESXi Host Link Layer Discovery Protocol
2534+
24802535 # region ESXi Host VMkernel Adapaters
24812536 Section - Style Heading5 ' VMkernel Adapters' {
24822537 Paragraph " The following section details the VMkernel adapter configuration for $VMHost "
0 commit comments