Skip to content

Commit 0136a9f

Browse files
authored
v1.0.4 patch (#42)
* Fix error in Cluster permissions code * Fix error in VDS Traffic Shaping code * Improve report readability for ESXi firewall reporting * Improve report readability for DRS Groups & DRS Rules reporting
1 parent 3a76b5b commit 0136a9f

File tree

3 files changed

+37
-20
lines changed

3 files changed

+37
-20
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.3'
14+
ModuleVersion = '1.0.4'
1515

1616
# Supported PSEditions
1717
CompatiblePSEditions = 'Desktop'

CHANGELOG.md

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

3+
## [1.0.4] - 2019-05-15
4+
### Changed
5+
- Fixed error in Cluster permissions code
6+
- Fixed error in VDS Traffic Shaping code
7+
- Improved report readability for ESXi firewall reporting
8+
- Improved report readability for DRS Groups & DRS Rules reporting
9+
310
## [1.0.3] - 2019-05-14
411
### Changed
512
- Improvements to code and report readability

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

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
55
.DESCRIPTION
66
Documents the configuration of VMware vSphere infrastucture in Word/HTML/XML/Text formats using PScribo.
77
.NOTES
8-
Version: 1.0.3
8+
Version: 1.0.4
99
Author: Tim Carman
1010
Twitter: @tpcarman
1111
Github: tpcarman
@@ -1245,14 +1245,17 @@ function Invoke-AsBuiltReport.VMware.vSphere {
12451245
$DrsGroups = foreach ($DrsClusterGroup in $DrsClusterGroups) {
12461246
[PSCustomObject]@{
12471247
'Name' = $DrsClusterGroup.Name
1248-
'Group Type' = $DrsClusterGroup.GroupType
1248+
'Type' = Switch ($DrsClusterGroup.GroupType) {
1249+
'VMGroup' { 'VM Group' }
1250+
'VMHostGroup' { 'Host Group' }
1251+
}
12491252
'Members' = Switch (($DrsClusterGroup.Member).Count -gt 0) {
12501253
$true { ($DrsClusterGroup.Member | Sort-Object) -join ', ' }
12511254
$false { "None" }
12521255
}
12531256
}
12541257
}
1255-
$DrsGroups | Sort-Object 'Name', 'Group Type' | Table -Name "$Cluster DRS Cluster Groups"
1258+
$DrsGroups | Sort-Object 'Name', 'Type' | Table -Name "$Cluster DRS Cluster Groups"
12561259
}
12571260
#endregion vSphere DRS Cluster Group
12581261

@@ -1263,13 +1266,18 @@ function Invoke-AsBuiltReport.VMware.vSphere {
12631266
$DrsVMHostRuleDetail = foreach ($DrsVMHostRule in $DrsVMHostRules) {
12641267
[PSCustomObject]@{
12651268
'Name' = $DrsVMHostRule.Name
1266-
'Type' = $DrsVMHostRule.Type
1269+
'Type' = Switch ($DrsVMHostRule.Type) {
1270+
'MustRunOn' { 'Must run on hosts in group' }
1271+
'ShouldRunOn' { 'Should run on hosts in group' }
1272+
'MustNotRunOn' { 'Must not run on hosts in group' }
1273+
'ShouldNotRunOn' { 'Should not run on hosts in group' }
1274+
}
12671275
'Enabled' = Switch ($DrsVMHostRule.Enabled) {
12681276
$true { 'Yes' }
12691277
$False { 'No' }
12701278
}
12711279
'VM Group' = $DrsVMHostRule.VMGroup
1272-
'VMHost Group' = $DrsVMHostRule.VMHostGroup
1280+
'Host Group' = $DrsVMHostRule.VMHostGroup
12731281
}
12741282
}
12751283
if ($Healthcheck.Cluster.DrsVMHostRules) {
@@ -1287,7 +1295,10 @@ function Invoke-AsBuiltReport.VMware.vSphere {
12871295
$DrsRuleDetail = foreach ($DrsRule in $DrsRules) {
12881296
[PSCustomObject]@{
12891297
'Name' = $DrsRule.Name
1290-
'Type' = $DrsRule.Type
1298+
'Type' = Switch ($DrsRule.Type) {
1299+
'VMAffinity' { 'Keep Vitrual Machines Together' }
1300+
'VMAntiAffinity' { 'Separate Virtual Machines' }
1301+
}
12911302
'Enabled' = Switch ($DrsRule.Enabled) {
12921303
$true { 'Yes' }
12931304
$False { 'No' }
@@ -1480,8 +1491,8 @@ function Invoke-AsBuiltReport.VMware.vSphere {
14801491
}
14811492
}
14821493
if ($Healthcheck.Cluster.VUMCompliance) {
1483-
$ClusterComplianceInfo | Where-Object {$_.Status -eq 'Unknown'} | Set-Style -Style Warning
1484-
$ClusterComplianceInfo | Where-Object {$_.Status -eq 'Not Compliant' -or $_.Status -eq 'Incompatible'} | Set-Style -Style Critical
1494+
$ClusterComplianceInfo | Where-Object { $_.Status -eq 'Unknown' } | Set-Style -Style Warning
1495+
$ClusterComplianceInfo | Where-Object { $_.Status -eq 'Not Compliant' -or $_.Status -eq 'Incompatible' } | Set-Style -Style Critical
14851496
}
14861497
$ClusterComplianceInfo | Sort-Object Name, Baseline | Table -Name "$Cluster Update Manager Compliance" -ColumnWidths 25, 50, 25
14871498
}
@@ -1536,7 +1547,6 @@ function Invoke-AsBuiltReport.VMware.vSphere {
15361547
}
15371548
#endregion Cluster Permissions
15381549
}
1539-
$ClusterVIPermissions | Sort-Object 'User/Group'| Table -Name "$Cluster Permissions"
15401550
}
15411551
}
15421552
#endregion Cluster Detailed Information
@@ -2385,7 +2395,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
23852395
$Services | Where-Object { $_.'Name' -eq 'NTP Daemon' -and $_.Daemon -eq 'Stopped' } | Set-Style -Style Critical -Property 'Daemon'
23862396
$Services | Where-Object { $_.'Name' -eq 'NTP Daemon' -and $_.'Startup Policy' -ne 'Start and stop with host' } | Set-Style -Style Critical -Property 'Startup Policy'
23872397
}
2388-
$Services | Sort-Object Name | Table -Name "$VMHost Services"
2398+
$Services | Sort-Object 'Name' | Table -Name "$VMHost Services"
23892399
}
23902400
#endregion ESXi Host Services
23912401

@@ -2396,21 +2406,22 @@ function Invoke-AsBuiltReport.VMware.vSphere {
23962406
Section -Style Heading5 'Firewall' {
23972407
$VMHostFirewall = foreach ($VMHostFirewallException in $VMHostFirewallExceptions) {
23982408
[PScustomObject]@{
2399-
'Name' = $VMHostFirewallException.Name
2400-
'Enabled' = Switch ($VMHostFirewallException.Enabled) {
2401-
$true { 'Yes' }
2402-
$false { 'No' }
2409+
'Service Name' = $VMHostFirewallException.Name
2410+
'Service' = Switch ($VMHostFirewallException.Enabled) {
2411+
$true { 'Enabled' }
2412+
$false { 'Disabled' }
24032413
}
24042414
'Incoming Ports' = $VMHostFirewallException.IncomingPorts
24052415
'Outgoing Ports' = $VMHostFirewallException.OutgoingPorts
24062416
'Protocols' = $VMHostFirewallException.Protocols
2407-
'Service Running' = Switch ($VMHostFirewallException.ServiceRunning) {
2408-
$true { 'Yes' }
2409-
$false { 'No' }
2417+
'Daemon' = Switch ($VMHostFirewallException.ServiceRunning) {
2418+
$true { 'Running' }
2419+
$false { 'Stopped' }
2420+
$null { 'N/A' }
24102421
}
24112422
}
24122423
}
2413-
$VMHostFirewall | Sort-Object 'Name' | Table -Name "$VMHost Firewall Configuration"
2424+
$VMHostFirewall | Sort-Object 'Service Name' | Table -Name "$VMHost Firewall Configuration"
24142425
}
24152426
}
24162427
#endregion ESXi Host Firewall
@@ -2641,7 +2652,6 @@ function Invoke-AsBuiltReport.VMware.vSphere {
26412652
}
26422653
$VDSTrafficShapingDetail | Sort-Object 'Direction' | Table -Name "$VDS Traffic Shaping"
26432654
}
2644-
$VDSTrafficShapingDetail | Sort-Object Direction | Table -Name "$VDS Traffic Shaping"
26452655
}
26462656
#endregion Distributed Virtual Switch Traffic Shaping
26472657

0 commit comments

Comments
 (0)