Open TyrrellStephen opened 1 year ago
I am not sure it makes sense to try and fix it. This is all coming up because people in Microsoft fill this values manually and they just randomly enter text in it where we try to fix it.
Edit. well maybe the first one I guess is valid, but the 2nd one is just random.
Input:
$Obj = Get-Office365Health -ApplicationID "..." -ApplicationKey "..." -TenantDomain "..." -Verbose # Command 1
$Obj = Get-Office365Health -ApplicationID "..." -ApplicationKey "..." -TenantDomain "..." -ToLocalTime -Verbose # Command 2
Exception (below) is thrown over and over again on lines 862, 890 and 896 of the PSM1 file:
A single warning is also issued once by the ConvertFrom-UTCTime function at line 634 of the PSM1 file
WARNING: ConvertFrom-UTCTime - couldn't convert time Next update by: Wednesday, Feb 22, 2023, at 11:00 AM UTC (after conversion Next update: Feb 22, 2023 11:00 AM ). Exception: Exception calling "Parse" with "1" argument(s): "The string 'Next update: Feb 22, 2023 11:00 AM ' was not recognized as a valid DateTime. There is an unknown word starting at index '0'.". Skipping conversion...
Cmdlet result:
Tested: v1.0.4
Modules loaded:
Command-Output mapping: Command 1 => output1.txt Command 2 => output2.txt The ApplicationID shown in the files attached has been changed for anonymity.
PSM1 code file (renamed): PSWinDocumentation.O365HealthService.psm1.txt
Locale: