Skip to content

Commit 9ff27ed

Browse files
authored
Merge pull request #54 from AsBuiltReport/dev
Branch Clean Up
2 parents a926b69 + 001d77a commit 9ff27ed

File tree

2 files changed

+36
-34
lines changed

2 files changed

+36
-34
lines changed

AsBuiltReport.VMware.vSphere.psd1

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#
88

99
@{
10-
# Script module or binary module file associated with this manifest.
11-
RootModule = 'AsBuiltReport.VMware.vSphere.psm1'
1210

1311
# Version number of this module.
1412
ModuleVersion = '1.0.5'
@@ -19,11 +17,20 @@
1917
# ID used to uniquely identify this module
2018
GUID = 'e1cbf1ce-cf01-4b6e-9cc2-56323da3c351'
2119

22-
# Author of this module
23-
Author = 'Tim Carman'
24-
20+
# Version number of this module.
21+
ModuleVersion = '1.0.0'
22+
23+
# Supported PSEditions
24+
CompatiblePSEditions = 'Desktop'
25+
26+
# ID used to uniquely identify this module
27+
GUID = 'e1cbf1ce-cf01-4b6e-9cc2-56323da3c351'
28+
29+
# Minimum version of the Windows PowerShell engine required by this module
30+
PowerShellVersion = '5.1'
31+
2532
# Company or vendor of this module
26-
# CompanyName = ''
33+
CompanyName = ''
2734

2835
# Copyright statement for this module
2936
Copyright = '(c) 2018 Tim Carman. All rights reserved.'
@@ -37,8 +44,8 @@
3744
# Name of the Windows PowerShell host required by this module
3845
# PowerShellHostName = ''
3946

40-
# Minimum version of the Windows PowerShell host required by this module
41-
# PowerShellHostVersion = ''
47+
# Modules that must be imported into the global environment prior to importing this module
48+
RequiredModules = @('AsBuiltReport.Core')
4249

4350
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
4451
DotNetFrameworkVersion = '4.5'
@@ -68,30 +75,16 @@
6875
# NestedModules = @()
6976

7077
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
71-
FunctionsToExport = @(
72-
'Invoke-AsBuiltReport.VMware.vSphere'
73-
)
78+
FunctionsToExport = 'Invoke-AsBuiltReport.VMware.vSphere'
7479

7580
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
76-
# CmdletsToExport = @()
81+
CmdletsToExport = @()
7782

7883
# Variables to export from this module
79-
# VariablesToExport = '*'
84+
# VariablesToExport = @()
8085

8186
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
82-
# AliasesToExport = @()
83-
84-
# DSC resources to export from this module
85-
# DscResourcesToExport = @()
86-
87-
# List of all modules packaged with this module
88-
# ModuleList = @()
89-
90-
# List of all files packaged with this module
91-
# FileList = @()
92-
93-
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
94-
PrivateData = @{
87+
AliasesToExport = @()
9588

9689
PSData = @{
9790
# Tags applied to this module. These help with module discovery in online galleries.
@@ -120,10 +113,11 @@
120113

121114
} # End of PSData hashtable
122115

123-
} # End of PrivateData hashtable
116+
# List of all modules packaged with this module
117+
# ModuleList = @()
124118

125-
# HelpInfo URI of this module
126-
# HelpInfoURI = ''
119+
# List of all files packaged with this module
120+
# FileList = @()
127121

128122
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
129123
# DefaultCommandPrefix = ''

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,6 +1982,11 @@ function Invoke-AsBuiltReport.VMware.vSphere {
19821982
$VMHostHbaIScsi | Sort-Object Device | Table -Name "$VMHost iSCSI Storage Adapters" -List -ColumnWidths 25, 75
19831983
}
19841984
}
1985+
if ($Healthcheck.Datastore.CapacityUtilization) {
1986+
$VMHostDsSpecs | Where-Object {$_.'% Used' -ge 90} | Set-Style -Style Critical
1987+
$VMHostDsSpecs | Where-Object {$_.'% Used' -ge 75 -and $_.'% Used' -lt 90} | Set-Style -Style Warning
1988+
}
1989+
$VMHostDsSpecs | Sort-Object Name | Table -Name "$VMHost Datastores" #-ColumnWidths 20,10,10,10,10,10,10,10,10
19851990
}
19861991
#endregion ESXi Host Storage Adapater Information
19871992
}
@@ -1999,10 +2004,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
19992004
'VMKernel Adapters' = ($VMHostNetwork.Vnic.Device | Sort-Object) -join ', '
20002005
'Physical Adapters' = ($VMHostNetwork.Pnic.Device | Sort-Object) -join ', '
20012006
'VMKernel Gateway' = $VMHostNetwork.IpRouteConfig.DefaultGateway
2002-
'IPv6 Enabled' = Switch ($VMHostNetwork.IPv6Enabled) {
2003-
$true { 'Yes' }
2004-
$false { 'No' }
2005-
}
2007+
'IPv6 Enabled' = $VMHostNetwork.IPv6Enabled
20062008
'VMKernel IPv6 Gateway' = $VMHostNetwork.IpRouteConfig.IpV6DefaultGateway
20072009
'DNS Servers' = ($VMHostNetwork.DnsConfig.Address | Sort-Object) -join ', '
20082010
'Host Name' = $VMHostNetwork.DnsConfig.HostName
@@ -2360,12 +2362,14 @@ function Invoke-AsBuiltReport.VMware.vSphere {
23602362
'lockdownStrict' { 'Enabled (Strict)' }
23612363
default { $VMHost.ExtensionData.Config.LockdownMode }
23622364
}
2365+
$VssPortgroupNicTeaming | Sort-Object 'vSwitch', 'Port Group' | Table -Name "$VMHost vSwitch Port Group NIC Teaming"
23632366
}
23642367
if ($Healthcheck.VMHost.LockdownMode) {
23652368
$LockdownMode | Where-Object { $_.'Lockdown Mode' -eq 'Disabled' } | Set-Style -Style Warning -Property 'Lockdown Mode'
23662369
}
23672370
$LockdownMode | Table -Name "$VMHost Lockdown Mode" -List -ColumnWidths 50, 50
23682371
}
2372+
#endregion ESXi Host Virtual Switch Port Group NIC Teaming
23692373
}
23702374
#endregion ESXi Host Lockdown Mode
23712375

@@ -2386,6 +2390,10 @@ function Invoke-AsBuiltReport.VMware.vSphere {
23862390
default { $VMHostService.Policy }
23872391
}
23882392
}
2393+
if ($Healthcheck.VMHost.LockdownMode) {
2394+
$LockdownMode | Where-Object {$_.'Lockdown Mode' -eq 'Disabled'} | Set-Style -Style Warning -Property 'Lockdown Mode'
2395+
}
2396+
$LockdownMode | Table -Name "$VMHost Lockdown Mode" -List -ColumnWidths 50, 50
23892397
}
23902398
if ($Healthcheck.VMHost.Services) {
23912399
$Services | Where-Object { $_.'Name' -eq 'SSH' -and $_.Daemon -eq 'Running' } | Set-Style -Style Warning -Property 'Daemon'
@@ -3384,4 +3392,4 @@ function Invoke-AsBuiltReport.VMware.vSphere {
33843392

33853393
} # End of Foreach $VIServer
33863394
#endregion Script Body
3387-
} # End Invoke-AsBuiltReport.VMware.vSphere function
3395+
} # End Invoke-AsBuiltReport.VMware.vSphere function

0 commit comments

Comments
 (0)