powershelldateget-wmiobject

"Get-WmiObject Win32_QuickFixEngineering" returns "InstalledOn" with a future date


I want to check via PowerShell for the latest date when security updates were installed. Therefore I'd like to use something like this:

Get-WmiObject Win32_QuickFixEngineering | Where-Object {
    $_.Description -eq "Security Update"
}

I tried using Get-CimInstance -Class, but that's not working on Windows 7.

Output is like this:

Source        Description      HotFixID      InstalledBy          InstalledOn
------        -----------      --------      -----------          -----------
VM10111       Security Update  KB4014579     NT-AUTORITÄT\SYSTEM  05.11.2017 00:00:00

Is the date incorrectly formatted or incorrectly displayed? How to avoid this?


Solution

  • The date is being displayed in MM.DD.YYYY format. So the actual date that is being represented is 11th May 2017 and it is not 5th November 2017.

    You Can also try the command

    Get-HotFix | where {$_.Description -eq 'Security Update'}

    to get the Installed security patches