Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable-CredentialGuard.ps1 Not Creating Valid TimeStamp for Cmtrace #5

Open
BaddMann opened this issue Nov 15, 2017 · 0 comments
Open

Comments

@BaddMann
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant