Skip to content

Commit bb86493

Browse files
authored
Merge pull request #45 from tpcarman/dev
v1.0.5 patch
2 parents 0136a9f + e1963ec commit bb86493

File tree

3 files changed

+35
-21
lines changed

3 files changed

+35
-21
lines changed

AsBuiltReport.VMware.vSphere.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
RootModule = 'AsBuiltReport.VMware.vSphere.psm1'
1212

1313
# Version number of this module.
14-
ModuleVersion = '1.0.4'
14+
ModuleVersion = '1.0.5'
1515

1616
# Supported PSEditions
1717
CompatiblePSEditions = 'Desktop'

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# VMware vSphere As Built Report Changelog
22

3+
## [1.0.5] - 2019-05-15
4+
### Changed
5+
- Fix errors in DRS rule code
6+
- Fix errors in DRS Vm Overrides code
7+
38
## [1.0.4] - 2019-05-15
49
### Changed
5-
- Fixed error in Cluster permissions code
6-
- Fixed error in VDS Traffic Shaping code
10+
- Fixed errors in Cluster permissions code
11+
- Fixed errors in VDS Traffic Shaping code
712
- Improved report readability for ESXi firewall reporting
813
- Improved report readability for DRS Groups & DRS Rules reporting
914

Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,8 +1309,8 @@ function Invoke-AsBuiltReport.VMware.vSphere {
13091309
if ($Healthcheck.Cluster.DrsRules) {
13101310
$DrsRuleDetail | Where-Object { $_.Enabled -eq 'No' } | Set-Style -Style Warning -Property 'Enabled'
13111311
}
1312-
$DrsRuleDetail | Sort-Object Type | Table -Name "$Cluster DRS Rules"
13131312
}
1313+
$DrsRuleDetail | Sort-Object Type | Table -Name "$Cluster DRS Rules"
13141314
}
13151315
#endregion vSphere DRS Cluster Rules
13161316
}
@@ -1466,7 +1466,6 @@ function Invoke-AsBuiltReport.VMware.vSphere {
14661466
$DasVmOverrideVmMonitoring | Sort-Object 'Virtual Machine' | Table -Name "$Cluster HA VM Overrides VM Monitoring"
14671467
}
14681468
}
1469-
$DasVmOverrideVmMonitoring | Sort-Object 'Virtual Machine' | Table -Name "$Cluster HA VM Overrides VM Monitoring"
14701469
}
14711470
}
14721471
}
@@ -1762,18 +1761,9 @@ function Invoke-AsBuiltReport.VMware.vSphere {
17621761
'Vendor' = $ESXiBootDevice.Vendor
17631762
'Model' = $ESXiBootDevice.Model
17641763
'Size' = "$([math]::Round($ESXiBootDevice.SizeMB / 1024), 2) GB"
1765-
'Is SAS' = Switch ($ESXiBootDevice.IsSAS) {
1766-
$true { 'Yes' }
1767-
$false { 'No' }
1768-
}
1769-
'Is SSD' = Switch ($ESXiBootDevice.IsSSD) {
1770-
$true { 'Yes' }
1771-
$false { 'No' }
1772-
}
1773-
'Is USB' = Switch ($ESXiBootDevice.IsUSB) {
1774-
$true { 'Yes' }
1775-
$false { 'No' }
1776-
}
1764+
'Is SAS' = $ESXiBootDevice.IsSAS
1765+
'Is SSD' = $ESXiBootDevice.IsSSD
1766+
'Is USB' = $ESXiBootDevice.IsUSB
17771767
'NTP Server(s)' = (Get-VMHostNtpServer -VMHost $VMHost | Sort-Object) -join ', '
17781768
}
17791769
$VMHostBootDevice | Table -Name "$VMHost Boot Device" -List -ColumnWidths 50, 50
@@ -2009,10 +1999,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
20091999
'VMKernel Adapters' = ($VMHostNetwork.Vnic.Device | Sort-Object) -join ', '
20102000
'Physical Adapters' = ($VMHostNetwork.Pnic.Device | Sort-Object) -join ', '
20112001
'VMKernel Gateway' = $VMHostNetwork.IpRouteConfig.DefaultGateway
2012-
'IPv6 Enabled' = Switch ($VMHostNetwork.IPv6Enabled) {
2013-
$true { 'Yes' }
2014-
$false { 'No' }
2015-
}
2002+
'IPv6 Enabled' = $VMHostNetwork.IPv6Enabled
20162003
'VMKernel IPv6 Gateway' = $VMHostNetwork.IpRouteConfig.IpV6DefaultGateway
20172004
'DNS Servers' = ($VMHostNetwork.DnsConfig.Address | Sort-Object) -join ', '
20182005
'Host Name' = $VMHostNetwork.DnsConfig.HostName
@@ -2182,10 +2169,12 @@ function Invoke-AsBuiltReport.VMware.vSphere {
21822169
'LoadbalanceSrcMac' { 'Route based on source MAC hash' }
21832170
'LoadbalanceIP' { 'Route based on IP hash' }
21842171
'ExplicitFailover' { 'Explicit Failover' }
2172+
default { $VSSwitchNicTeam.LoadBalancingPolicy }
21852173
}
21862174
'Failover Detection' = Switch ($VSSwitchNicTeam.NetworkFailoverDetectionPolicy) {
21872175
'LinkStatus' { 'Link Status' }
21882176
'BeaconProbing' { 'Beacon Probing' }
2177+
default { $VSSwitchNicTeam.NetworkFailoverDetectionPolicy }
21892178
}
21902179
'Notify Switches' = Switch ($VSSwitchNicTeam.NotifySwitches) {
21912180
$true { 'Enabled' }
@@ -2242,10 +2231,12 @@ function Invoke-AsBuiltReport.VMware.vSphere {
22422231
'LoadbalanceSrcMac' { 'Route based on source MAC hash' }
22432232
'LoadbalanceIP' { 'Route based on IP hash' }
22442233
'ExplicitFailover' { 'Explicit Failover' }
2234+
default { $VssPortgroupNicTeam.LoadBalancingPolicy }
22452235
}
22462236
'Failover Detection' = Switch ($VssPortgroupNicTeam.NetworkFailoverDetectionPolicy) {
22472237
'LinkStatus' { 'Link Status' }
22482238
'BeaconProbing' { 'Beacon Probing' }
2239+
default { $VssPortgroupNicTeam.NetworkFailoverDetectionPolicy }
22492240
}
22502241
'Notify Switches' = Switch ($VssPortgroupNicTeam.NotifySwitches) {
22512242
$true { 'Enabled' }
@@ -2322,10 +2313,12 @@ function Invoke-AsBuiltReport.VMware.vSphere {
23222313
'LoadbalanceSrcMac' { 'Route based on source MAC hash' }
23232314
'LoadbalanceIP' { 'Route based on IP hash' }
23242315
'ExplicitFailover' { 'Explicit Failover' }
2316+
default { $VssPortgroupNicTeam.LoadBalancingPolicy }
23252317
}
23262318
'Failover Detection' = Switch ($VssPortgroupNicTeam.NetworkFailoverDetectionPolicy) {
23272319
'LinkStatus' { 'Link Status' }
23282320
'BeaconProbing' { 'Beacon Probing' }
2321+
default { $VssPortgroupNicTeam.NetworkFailoverDetectionPolicy }
23292322
}
23302323
'Notify Switches' = Switch ($VssPortgroupNicTeam.NotifySwitches) {
23312324
$true { 'Enabled' }
@@ -2362,6 +2355,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
23622355
'lockdownDisabled' { 'Disabled' }
23632356
'lockdownNormal' { 'Enabled (Normal)' }
23642357
'lockdownStrict' { 'Enabled (Strict)' }
2358+
default { $VMHost.ExtensionData.Config.LockdownMode }
23652359
}
23662360
}
23672361
if ($Healthcheck.VMHost.LockdownMode) {
@@ -2386,6 +2380,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
23862380
'automatic' { 'Start and stop with port usage' }
23872381
'on' { 'Start and stop with host' }
23882382
'off' { 'Start and stop manually' }
2383+
default { $VMHostService.Policy }
23892384
}
23902385
}
23912386
}
@@ -2418,6 +2413,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
24182413
$true { 'Running' }
24192414
$false { 'Stopped' }
24202415
$null { 'N/A' }
2416+
default { $VMHostFirewallException.ServiceRunning }
24212417
}
24222418
}
24232419
}
@@ -2455,6 +2451,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
24552451
'Power State' = Switch ($VMHostVM.PowerState) {
24562452
'PoweredOn' { 'Powered On' }
24572453
'PoweredOff' { 'Powered Off' }
2454+
default { $VMHostVM.PowerState }
24582455
}
24592456
'CPUs' = $VMHostVM.NumCpu
24602457
'Cores per Socket' = $VMHostVM.CoresPerSocket
@@ -2467,6 +2464,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
24672464
'toolsOk' { 'Tools OK' }
24682465
'toolsNotRunning' { 'Tools Not Running' }
24692466
'toolsNotInstalled' { 'Tools Not Installed' }
2467+
default { $VMHostVM.ExtensionData.Guest.ToolsStatus }
24702468
}
24712469
}
24722470
}
@@ -2490,6 +2488,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
24902488
'Startup' = Switch ($VMStartPol.StartAction) {
24912489
'PowerOn' { 'Enabled' }
24922490
'None' { 'Disabled' }
2491+
default { $VMStartPol.StartAction }
24932492
}
24942493
'Startup Delay' = "$($VMStartPol.StartDelay) seconds"
24952494
'VMware Tools' = Switch ($VMStartPol.WaitForHeartbeat) {
@@ -2714,10 +2713,12 @@ function Invoke-AsBuiltReport.VMware.vSphere {
27142713
'LoadbalanceSrcMac' { 'Route based on source MAC hash' }
27152714
'LoadbalanceIP' { 'Route based on IP hash' }
27162715
'ExplicitFailover' { 'Explicit Failover' }
2716+
default { $VDUplink.LoadBalancingPolicy }
27172717
}
27182718
'Failover Detection' = Switch ($VDUplink.FailoverDetectionPolicy) {
27192719
'LinkStatus' { 'Link Status' }
27202720
'BeaconProbing' { 'Beacon Probing' }
2721+
default { $VDUplink.FailoverDetectionPolicy }
27212722
}
27222723
'Notify Switches' = Switch ($VDUplink.NotifySwitches) {
27232724
$true { 'Enabled' }
@@ -2993,6 +2994,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
29932994
'SDRS Automation Level' = Switch ($DSCluster.SdrsAutomationLevel) {
29942995
'FullyAutomated' { 'Fully Automated' }
29952996
'Manual' { 'Manual' }
2997+
default {$DSCluster.SdrsAutomationLevel}
29962998
}
29972999
'Space Utilization Threshold' = "$($DSCluster.SpaceUtilizationThresholdPercent)%"
29983000
'I/O Load Balance' = Switch ($DSCluster.IOLoadBalanceEnabled) {
@@ -3034,6 +3036,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
30343036
'SDRS Automation Level' = Switch ($DSCluster.SdrsAutomationLevel) {
30353037
'FullyAutomated' { 'Fully Automated' }
30363038
'Manual' { 'Manual' }
3039+
default { $DSCluster.SdrsAutomationLevel }
30373040
}
30383041
'Space Utilization Threshold' = "$($DSCluster.SpaceUtilizationThresholdPercent)%"
30393042
'I/O Load Balance' = Switch ($DSCluster.IOLoadBalanceEnabled) {
@@ -3132,6 +3135,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
31323135
'Power State' = Switch ($VM.PowerState) {
31333136
'PoweredOn' { 'Powered On' }
31343137
'PoweredOff' { 'Powered Off' }
3138+
default { $VM.PowerState }
31353139
}
31363140
'vCPUs' = $VM.NumCpu
31373141
'Cores per Socket' = $VM.CoresPerSocket
@@ -3144,6 +3148,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
31443148
'toolsOk' { 'Tools OK' }
31453149
'toolsNotRunning' { 'Tools Not Running' }
31463150
'toolsNotInstalled' { 'Tools Not Installed' }
3151+
default { $VM.ExtensionData.Guest.ToolsStatus }
31473152
}
31483153
}
31493154
}
@@ -3173,12 +3178,14 @@ function Invoke-AsBuiltReport.VMware.vSphere {
31733178
'Power State' = Switch ($VM.PowerState) {
31743179
'PoweredOn' { 'Powered On' }
31753180
'PoweredOff' { 'Powered Off' }
3181+
default { $VM.PowerState }
31763182
}
31773183
'VM Tools Status' = Switch ($VM.ExtensionData.Guest.ToolsStatus) {
31783184
'toolsOld' { 'Tools Old' }
31793185
'toolsOk' { 'Tools OK' }
31803186
'toolsNotRunning' { 'Tools Not Running' }
31813187
'toolsNotInstalled' { 'Tools Not Installed' }
3188+
default { $VM.ExtensionData.Guest.ToolsStatus }
31823189
}
31833190
'Fault Tolerance State' = Switch ($VM.ExtensionData.Runtime.FaultToleranceState) {
31843191
'notConfigured' { 'Not Configured' }
@@ -3187,6 +3194,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
31873194
'disabled' { 'Disabled' }
31883195
'starting' { 'Starting' }
31893196
'enabled' { 'Enabled' }
3197+
default { $VM.ExtensionData.Runtime.FaultToleranceState }
31903198
}
31913199
'Host' = $VM.VMHost.Name
31923200
'Parent' = $VM.VMHost.Parent.Name
@@ -3227,6 +3235,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
32273235
'compliant' { 'Compliant' }
32283236
'nonCompliant' { 'Non Compliant' }
32293237
'unknown' { 'Unknown' }
3238+
default { $VMSpbmPolicy.ComplianceStatus }
32303239
}
32313240
'vNICs' = $VM.ExtensionData.Summary.Config.NumEthernetCards
32323241
}

0 commit comments

Comments
 (0)