Enable-CredentialGuard.ps1 Not Creating Valid TimeStamp for Cmtrace
BaddMann opened this issue · 0 comments
BaddMann commented
Was looking at the logs and noticed that here in Arizona this happens:
Get-WmiObject -Class Win32_TimeZone | Select-Object -ExpandProperty Bias
Gives us
-420
A negative value added to the end of the $Time string can not be parsed by the Cmtrace tool.
so on line 57 I added an Absolute Value Function to the result:
$Time = -join @((Get-Date -Format "HH:mm:ss.fff"), "+", [math]::abs((Get-WmiObject -Class Win32_TimeZone | Select-Object -ExpandProperty Bias)))
I have no idea if this is the right thing to do, I just know it's the quick fix I had to put in place, I'm sure you have a better answer.