arielsanchezmora / vDocumentation

vDocumentation provides a community-created set of PowerCLI scripts that produce infrastructure documentation of vSphere environments in CSV or Excel file format.
MIT License
157 stars 49 forks source link

Get-ESXSpeculativeExecution #46

Closed rgb99 closed 6 years ago

rgb99 commented 6 years ago

Out of 38 hosts checked against Get-ESXSpeculativeExecution, four returned an error, shown below:

Get-Date : Cannot convert 'System.Object[]' to the type 'System.DateTime' required by parameter 'Date'. Specified
method is not supported.
At C:\Program Files\WindowsPowerShell\Modules\vDocumentation\2.4.4\Public\Get-ESXSpeculativeExecution.ps1:400 char:37
+ ...     $lastPatched = Get-Date ($dateInstalledUTC.ToLocalTime()) -Format ...
+                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.GetDateCommand

Nothing was missing or strange from the Excel file other than a blank 'Last patched' field on the first host.

edmsanchez commented 6 years ago

Hi rgb99, could you please update to latest version 2.4.6 and run the Cmdlet with -verbose against the 4 failing hosts, that may give us better information.

rgb99 commented 6 years ago

Updated module and re-ran cmdlet. No errors this time.