-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #616 from alanrenouf/dev
Merge dev to master - version 6.25
- Loading branch information
Showing
30 changed files
with
13,312 additions
and
1,448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# culture="en-US" | ||
ConvertFrom-StringData @' | ||
pluginActivity = Searching Datastores | ||
pluginStatus = [{0} of {1}] {2} | ||
Complete = completed | ||
'@ | ||
# culture="en-US" | ||
ConvertFrom-StringData @' | ||
pluginActivity = Searching Datastores | ||
pluginStatus = [{0} of {1}] {2} | ||
Complete = completed | ||
'@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
# culture="en-US" | ||
ConvertFrom-StringData @' | ||
setupMsg01 = | ||
setupMsg02 = Welcome to vCheck by Virtu-Al http://virtu-al.net | ||
setupMsg03 = ================================================= | ||
setupMsg04 = This is the first time you have run this script or you have re-enabled the setup wizard. | ||
setupMsg05 = | ||
setupMsg06 = To re-run this wizard in the future please use vCheck.ps1 -Config | ||
setupMsg07 = To get usage information, please use Get-Help vCheck.ps1 | ||
setupMsg08 = | ||
setupMsg09 = Please complete the following questions or hit Enter to accept the current setting | ||
setupMsg10 = After completing this wizard the vCheck report will be displayed on the screen. | ||
setupMsg11 = | ||
configMsg01 = After you have exported the new settings from the configuration interface, | ||
configMsg02 = import the settings CSV file using Import-vCheckSettings -csvfile C:\\path\\to\\vCheckSettings.csv | ||
configMsg03 = NOTE: If vCheckSettings.csv is stored in the vCheck folder, simply run Import-vCheckSettings | ||
resFileWarn = Image File not found for {0}! | ||
pluginInvalid = Plugin does not exist: {0} | ||
pluginpathInvalid = Plugin path "{0}" is invalid, defaulting to {1} | ||
gvInvalid = Global Variables path invalid in job specification, defaulting to {0} | ||
varUndefined = Variable `${0} is not defined in GlobalVariables.ps1 | ||
pluginActivity = Evaluating plugins | ||
pluginStatus = [{0} of {1}] {2} | ||
Complete = Complete | ||
pluginBegin = \nBegin Plugin Processing | ||
pluginStart = ..start calculating {0} by {1} v{2} [{3} of {4}] | ||
pluginEnd = ..finished calculating {0} by {1} v{2} [{3} of {4}] | ||
repTime = This report took {0} minutes to run all checks, completing on {1} at {2} | ||
repPRTitle = Plugin Report | ||
repTTRTitle = Time to Run | ||
slowPlugins = The following plugins took longer than {0} seconds to run, there may be a way to optimize these or remove them if not needed | ||
emailSend = ..Sending Email | ||
emailAtch = vCheck attached to this email | ||
HTMLdisp = ..Displaying HTML results | ||
'@ | ||
|
||
# culture="en-US" | ||
ConvertFrom-StringData @' | ||
setupMsg01 = | ||
setupMsg02 = Welcome to vCheck by Virtu-Al http://virtu-al.net | ||
setupMsg03 = ================================================= | ||
setupMsg04 = This is the first time you have run this script or you have re-enabled the setup wizard. | ||
setupMsg05 = | ||
setupMsg06 = To re-run this wizard in the future please use vCheck.ps1 -Config | ||
setupMsg07 = To get usage information, please use Get-Help vCheck.ps1 | ||
setupMsg08 = | ||
setupMsg09 = Please complete the following questions or hit Enter to accept the current setting | ||
setupMsg10 = After completing this wizard the vCheck report will be displayed on the screen. | ||
setupMsg11 = | ||
configMsg01 = After you have exported the new settings from the configuration interface, | ||
configMsg02 = import the settings CSV file using Import-vCheckSettings -csvfile C:\\path\\to\\vCheckSettings.csv | ||
configMsg03 = NOTE: If vCheckSettings.csv is stored in the vCheck folder, simply run Import-vCheckSettings | ||
resFileWarn = Image File not found for {0}! | ||
pluginInvalid = Plugin does not exist: {0} | ||
pluginpathInvalid = Plugin path "{0}" is invalid, defaulting to {1} | ||
gvInvalid = Global Variables path invalid in job specification, defaulting to {0} | ||
varUndefined = Variable `${0} is not defined in GlobalVariables.ps1 | ||
pluginActivity = Evaluating plugins | ||
pluginStatus = [{0} of {1}] {2} | ||
Complete = Complete | ||
pluginBegin = \nBegin Plugin Processing | ||
pluginStart = ..start calculating {0} by {1} v{2} [{3} of {4}] | ||
pluginEnd = ..finished calculating {0} by {1} v{2} [{3} of {4}] | ||
repTime = This report took {0} minutes to run all checks, completing on {1} at {2} | ||
repPRTitle = Plugin Report | ||
repTTRTitle = Time to Run | ||
slowPlugins = The following plugins took longer than {0} seconds to run, there may be a way to optimize these or remove them if not needed | ||
emailSend = ..Sending Email | ||
emailAtch = vCheck attached to this email | ||
HTMLdisp = ..Displaying HTML results | ||
'@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# culture="en-US" | ||
|
||
ConvertFrom-StringData @' | ||
connReuse = Re-using connection to VI Server | ||
connOpen = Connecting to VI Server | ||
connError = Unable to connect to vCenter, please ensure you have altered the vCenter server address correctly. To specify a username and password edit the connection string in the file $GlobalVariables | ||
custAttr = Adding Custom properties | ||
collectVM = Collecting VM Objects | ||
collectHost = Collecting VM Host Objects | ||
collectCluster = Collecting Cluster Objects | ||
collectDatastore = Collecting Datastore Objects | ||
collectDVM = Collecting Detailed VM Objects | ||
collectTemplate = Collecting Template Objects | ||
collectDVIO = Collecting Detailed VI Objects | ||
collectAlarm = Collecting Detailed Alarm Objects | ||
collectDHost = Collecting Detailed VMHost Objects | ||
collectDCluster = Collecting Detailed Cluster Objects | ||
collectDDatastore = Collecting Detailed Datastore Objects | ||
collectDDatastoreCluster = Collecting Detailed Datastore Cluster Objects | ||
collectAlarms = Collecting Alarm Definitions | ||
# culture="en-US" | ||
|
||
ConvertFrom-StringData @' | ||
connReuse = Re-using connection to VI Server | ||
connOpen = Connecting to VI Server | ||
connError = Unable to connect to vCenter, please ensure you have altered the vCenter server address correctly. To specify a username and password edit the connection string in the file $GlobalVariables | ||
custAttr = Adding Custom properties | ||
collectVM = Collecting VM Objects | ||
collectHost = Collecting VM Host Objects | ||
collectCluster = Collecting Cluster Objects | ||
collectDatastore = Collecting Datastore Objects | ||
collectDVM = Collecting Detailed VM Objects | ||
collectTemplate = Collecting Template Objects | ||
collectDVIO = Collecting Detailed VI Objects | ||
collectAlarm = Collecting Detailed Alarm Objects | ||
collectDHost = Collecting Detailed VMHost Objects | ||
collectDCluster = Collecting Detailed Cluster Objects | ||
collectDDatastore = Collecting Detailed Datastore Objects | ||
collectDDatastoreCluster = Collecting Detailed Datastore Cluster Objects | ||
collectAlarms = Collecting Alarm Definitions | ||
'@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
$Title = "vCenter License Report" | ||
$Header = "License Report" | ||
$Comments = "The following displays licenses registered with this server and usage." | ||
$Display = "Table" | ||
$Author = "Justin Mercier" | ||
$PluginVersion = 1.1 | ||
$PluginCategory = "vSphere" | ||
|
||
# Start of Settings | ||
# Display Eval licenses? | ||
$licenseEvals = $true | ||
# End of Settings | ||
|
||
$vSphereLicInfo = @() | ||
|
||
Foreach ($LicenseMan in Get-View ($ServiceInstance | Select-Object -First 1).Content.LicenseManager) | ||
{ | ||
($LicenseMan | Select-Object -ExpandProperty Licenses) | Select-Object @{Name="VC";e={([Uri]$LicenseMan.Client.ServiceUrl).Host}}, ` | ||
($LicenseMan | Select-Object -ExpandProperty Licenses) | Where {$licenseEvals -or $_.Name -notmatch "Evaluation" } | Select-Object @{Name="VC";e={([Uri]$LicenseMan.Client.ServiceUrl).Host}}, ` | ||
Name, LicenseKey, Total, Used, @{Name="Information";e={$_.Labels | Select-Object -ExpandProperty Value}}, ` | ||
@{"Name"="ExpirationDate";e={$_.Properties | Where-Object { $_.key -eq "expirationDate" } | Select-Object -ExpandProperty Value}} | ||
@{"Name"="ExpirationDate";e={$_.Properties | Where-Object { $_.key -eq "expirationDate" } | Select-Object -ExpandProperty Value}} | ||
} | ||
|
||
$Title = "vCenter License Report" | ||
$Header = "License Report" | ||
$Comments = "The following displays licenses registered with this server and usage. Include Evals: $licenseEvals" | ||
$Display = "Table" | ||
$Author = "Justin Mercier, Bill Wall" | ||
$PluginVersion = 1.2 | ||
$PluginCategory = "vSphere" | ||
|
||
# Changelog | ||
## 1.0 : Initial Release | ||
## 1.1 : Code refactor | ||
## 1.1 : Code refactor | ||
## 1.2 : Added the ability to exclude evaluation licenses, clean up whitespace (@thebillness) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$Title = "Host Multipath Policy" | ||
$Comments = "See the Storage/SAN section of the <a href='https://www.vmware.com/resources/compatibility/search.php?deviceCategory=san' target='_blank'>VMware Compatibility Guide</a> or your array/storage vendor's documentation for the supported/recommended policy." | ||
$Display = "Table" | ||
$Author = "Doug Taliaferro" | ||
$PluginVersion = 1.0 | ||
$PluginCategory = "vSphere" | ||
|
||
# Start of Settings | ||
# The Multipath Policy (PSP Plugin) your hosts should be configured to use | ||
$MultipathPolicy = "VMW_PSP_RR" | ||
# End of Settings | ||
|
||
# Update settings where there is an override | ||
$MultipathPolicy = Get-vCheckSetting $Title "MultipathPolicy" $MultipathPolicy | ||
|
||
$lunResults = @() | ||
Foreach ($esxhost in ($HostsViews | Where-Object {$_.Runtime.ConnectionState -match "Connected|Maintenance"})) { | ||
$esxhost | ForEach-Object {$_.config.storageDevice.multipathInfo.lun} | Where-Object {$_.path.count -gt 1 } | Where-Object {$_.policy.policy -ne $MultipathPolicy} | ForEach-Object { | ||
$myObj = "" | Select-Object VMHost, LunID, Policy | ||
$myObj.VMHost = $esxhost.Name | ||
$myObj.LunID = $_.ID | ||
$myObj.Policy = $_.Policy.policy | ||
$lunResults += $myObj | ||
} | ||
} | ||
|
||
$lunResults | ||
|
||
$Header = "Hosts/LUNs not using Multipath Policy '$($MultipathPolicy)' : [count]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
$Title = "Host Power Management Policy" | ||
$Comments = "The following hosts are not using the specified power management policy. Power management may impact performance for latency sensitive workloads. For details see <a href='https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/techpaper/performance/Perf_Best_Practices_vSphere65.pdf' >Performance Best Practices for VMware vSphere 6.5</a>" | ||
$Display = "Table" | ||
$Author = "Doug Taliaferro" | ||
$PluginVersion = 1.0 | ||
$PluginCategory = "vSphere" | ||
|
||
# Start of Settings | ||
# Which power management policy should your hosts use? For Balanced enter "dynamic" (this is the ESXi default policy), for High Performance enter "static", for Low power enter "low". | ||
$PowerPolicy = "dynamic" | ||
# End of Settings | ||
|
||
# Update settings where there is an override | ||
$PowerPolicy = Get-vCheckSetting $Title "PowerPolicy" $PowerPolicy | ||
|
||
$hostResults = @() | ||
Foreach ($esxhost in ($HostsViews | Where-Object {$_.Runtime.ConnectionState -match "Connected|Maintenance"})) { | ||
If ($esxhost.config.PowerSystemInfo.CurrentPolicy.ShortName -ne $PowerPolicy) { | ||
$myObj = "" | Select-Object VMHost, PowerPolicy | ||
$myObj.VMHost = $esxhost.Name | ||
$myObj.PowerPolicy = $esxhost.config.PowerSystemInfo.CurrentPolicy.ShortName | ||
$hostResults += $myObj | ||
} | ||
} | ||
|
||
$hostResults | ||
|
||
$Header = "Hosts not using Power Mangement Policy '$($PowerPolicy)' : [count]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
$Title = "Host NFS Settings" | ||
$Comments = "The following hosts may not have the recommended settings for NFS storage. See <a href='https://kb.vmware.com/s/article/2239' target='_blank'>VMware KB 2239</a> and your storage vendor's documentation for the recommended settings." | ||
$Display = "Table" | ||
$Author = "Doug Taliaferro" | ||
$PluginVersion = 1.0 | ||
$PluginCategory = "vSphere" | ||
|
||
# Create an object to store the settings - the property names match the ESXi advanced setting name so we | ||
# can use them to get each setting from the host and compare them | ||
$myObj = "" | Select-Object Misc.APDTimeout, NFS.HeartbeatTimeout, NFS.SendBufferSize, NFS.ReceiveBufferSize, NFS.MaxVolumes, ` | ||
Net.TcpipHeapMax, Net.TcpipHeapSize, NFS.HeartbeatFrequency, NFS.HeartbeatDelta, NFS.HeartbeatMaxFailures | ||
# Start of Settings | ||
# APD Timeout - default of 140 is usually recommended (consult with your storage vendor) | ||
$myObj.'Misc.APDTimeout' = "140" | ||
# NFS Heartbeat Timeout - default of 5 is usually recommended (consult with your storage vendor) | ||
$myObj.'NFS.HeartbeatTimeout' = "5" | ||
# NFS Send Buffer Size - default of 264 is usually recommended (consult with your storage vendor) | ||
$myObj.'NFS.SendBufferSize' = "264" | ||
# NFS Receive Buffer Size - default of 256 is usually recommended (consult with your storage vendor) | ||
$myObj.'NFS.ReceiveBufferSize' = "256" | ||
# NFS Max Volumes - ESXi host default is 8, but 256 is often recommended (see VMware KB 2239) | ||
$myObj.'NFS.MaxVolumes' = "256" | ||
# Net TCPIP Heap Max - for ESXi 6.x this can be increased to '1536' (see VMware KB 2239) | ||
$myObj.'Net.TcpipHeapMax' = "512" | ||
# Net TCPIP Heap Size - ESXi host default is 0, but 32 is often recommended (see VMware KB 2239) | ||
$myObj.'Net.TcpipHeapSize' = "32" | ||
# NFS Heartbeat Frequency - default of 12 is usually recommended (consult with your storage vendor) | ||
$myObj.'NFS.HeartbeatFrequency' = "12" | ||
# NFS Heartbeat Delta - default of 5 is usually recommended (consult with your storage vendor) | ||
$myObj.'NFS.HeartbeatDelta' = "5" | ||
# NFS Heartbeat Max Failures - default of 10 is usually recommended (consult with your storage vendor) | ||
$myObj.'NFS.HeartbeatMaxFailures' = "10" | ||
# End of Settings | ||
|
||
$hostResults = @() | ||
Foreach ($esxhost in ($HostsViews | Where-Object {$_.Runtime.ConnectionState -match "Connected|Maintenance"})) { | ||
|
||
# Create an object to store the host settings | ||
$hostObj = New-Object Object | ||
# Iterate through each property in the custom object containing the settings | ||
$myObj.psobject.Properties | % { | ||
$PropertyName = $_.Name | ||
$hostObj | Add-Member -MemberType NoteProperty -Name $PropertyName -Value ($esxhost.Config.Option | Where-Object { $_.Key -eq $PropertyName }).Value | ||
} | ||
|
||
# Compare the two objects for differences | ||
If ((Compare-Object ($hostObj | Out-String -Stream) ($myObj | Out-String -Stream)).count -gt 0) { | ||
# If they don't match, create a final object that includes the host name | ||
$finalObj = New-Object Object | ||
$finalObj | Add-Member -MemberType NoteProperty -Name VMHost -Value $esxhost.Name | ||
Foreach ( $Property in $hostObj.psobject.Properties){ | ||
$finalObj | Add-Member -MemberType NoteProperty -Name $Property.Name -Value $Property.value | ||
} | ||
$hostResults += $finalObj | ||
} | ||
} | ||
|
||
# If there are results, create a header row to show the plugin settings in the report | ||
if ($hostResults.Count -gt 0) { | ||
$headObj = New-Object Object | ||
$headObj | Add-Member -MemberType NoteProperty -Name VMHost -Value "Plugin Settings" | ||
foreach ( $Property in $myObj.psobject.Properties){ | ||
$headObj | Add-Member -MemberType NoteProperty -Name $Property.Name -Value $Property.value | ||
} | ||
$hostResults = ,$headObj + $hostResults | ||
} | ||
$hostResults | ||
|
||
$Header = "Host NFS settings that don't match : [count]" | ||
# Table formatting - highlight cells without matching settings | ||
$TableFormat = @{} | ||
foreach ($Property in $myObj.psObject.Properties) { | ||
$TableFormat += @{"$($Property.Name)" = @(@{"-ne $($Property.Value)" = "Cell,class|critical"; })} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$Title = "Eval License Keys" | ||
$Header = "Hosts using an Evaluation Key : [count]" | ||
$Comments = "The following hosts are using an evaluation key that will expire, causing them to disconnect from vCenter." | ||
$Display = "Table" | ||
$Author = "Doug Taliaferro" | ||
$PluginVersion = 1.0 | ||
$PluginCategory = "vSphere" | ||
|
||
# Start of Settings | ||
# End of Settings | ||
|
||
$VMH | where-object {($_.ConnectionState -match "Connected|Maintenance") -and ($_.LicenseKey -eq "00000-00000-00000-00000-00000")} | Select Name, LicenseKey |
Oops, something went wrong.