Get-Hotfix object installdate

Welcome Forums General PowerShell Q&A Get-Hotfix object installdate

This topic contains 1 reply, has 2 voices, and was last updated by

3 years, 10 months ago.

  • Author
  • #21512

    Points: 0
    Rank: Member

    I am a newbie and have completed the JumpStarts and working through the Learn Windows PowerShell 3 in a Month of Lunches and have run into something that has confused me with the Chapter 8 Lab. It wants me to select and sort by the Installed Date and when I look at the
    members of the get-hotfix cmdlet, it shows 'InstallDate' but when you use it you don't get a return. By just running get-hotfix, I notice the column 'InstalledOn'. When I select InstalledOn instead of InstallDate I get the results I am expecting. My question is then, am I misunderstanding something?

    PS C:\> Get-HotFix | gm

    TypeName: System.Management.ManagementObject#root\cimv2\Win32_QuickFixEngineering

    Name MemberType Definition
    —- ———- ———-
    PSComputerName AliasProperty PSComputerName = __SERVER
    Caption Property string Caption {get;set;}
    CSName Property string CSName {get;set;}
    Description Property string Description {get;set;}
    FixComments Property string FixComments {get;set;}
    HotFixID Property string HotFixID {get;set;}
    InstallDate Property string InstallDate {get;set;}
    InstalledBy Property string InstalledBy {get;set;}
    Name Property string Name {get;set;}

    PS C:\> Get-HotFix

    Source Description HotFixID InstalledBy InstalledOn
    —— ———– ——– ———– ———–
    CLTPF01UEW6 Update KB2899189_... NT AUTHORITY\SYSTEM 6/16/2014 12:00:00 AM

  • #21513

    Points: 1,624
    Helping HandTeam Member
    Rank: Community Hero

    No, you're not.

    The InstallDate of the base object isn't usually populated by the OS. The PowerShell team added InstalledOn, which is a ScriptProperty that digs into the object to get the date – so that you'll have one.

The topic ‘Get-Hotfix object installdate’ is closed to new replies.