AutoRuns icon indicating copy to clipboard operation
AutoRuns copied to clipboard

DateTime objects created by New-AutoRunsBaseLine

Open p0w3rsh3ll opened this issue 3 years ago • 0 comments

Steps to reproduce

Run twice the following in 2 different consoles and after changing the time zone.

Get-PSAutorun -VerifyDigitalSignature |
Where { -not($_.isOSbinary)} |
New-AutoRunsBaseLine -Verbose

# and compare baselines using the Compare-AutoRunsBaseLine function

Expected behavior

No diff presented by the Compare-AutoRunsBaseLine function

Actual behavior

There's a diff because of the DateTime objects exported by the New-AutoRunsBaseLine function.

It needs to be stored as UTC to avoid any local time zone changes.

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.17763.1971
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.1971
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

p0w3rsh3ll avatar Jun 08 '21 11:06 p0w3rsh3ll