On some systems, Get-HotFix
has many entries with an empty InstalledOn
column.
This at least shows there is a date-format difference, but now the Source
column is empty.:
Get-HotFix | Select-Object Source,Description,HotfixID,InstalledBy,InstalledOn,@{Name="InstalledOnValue";Expression={$_.psbase.properties["InstalledOn"].Value}} | Out-GridView
I contemplated using Microsoft.Update.Session
in the scripts below, but it requires WinRM
, the server side implementation of WS-Management – Wikipedia:
- [WayBack] Script Get Installed Software Updates Tool
- [WayBack] Find pending updates on local or remote computers | Learn Powershell | Achieve More
- [WayBack] Get List of Installed Windows / Office Updates Command Line through Powershell –
- [WayBack] List updates, hotfixes, and Service Packs with Simple Commands – Simple Talk
[ERROR] [DevMachine] Connecting to remote server DevMachine failed with the following
[ERROR] error message : The client cannot connect to the destination specified in the
[ERROR] request. Verify that the service on the destination is running and is accepting
[ERROR] requests. Consult the logs and documentation for the WS-Management service run
[ERROR] ning on the destination, most commonly IIS or WinRM. If the destination is the
[ERROR] WinRM service, run the following command on the destination to analyze and conf
[ERROR] igure the WinRM service: "winrm quickconfig". For more information, see the abo
[ERROR] ut_Remote_Troubleshooting Help topic.
[ERROR] + CategoryInfo : OpenError: (DevMachine:String) [], PSRemotingTr
[ERROR] ansportException
[ERROR] + FullyQualifiedErrorId : CannotConnect,PSSessionStateBroken
This is a reminder to find and document a proper fix for this.
This at least works:
Get-HotFix | Select-Object Source,Description,HotfixID,InstalledBy,InstalledOn,@{Name="InstalledOnDateTime";Expression={[System.DateTime]::Parse($_.PSBase.Properties["InstalledOn"].Value,[System.Globalization.CultureInfo]::GetCultureInfo("en-US"))}} | Out-GridView
Some links that hopefully help with proper documenting it:
- [WayBack] Get-HotFix
- [WayBack] Win32_QuickFixEngineering class (Windows)
- [WayBack] Select-Object
- [WayBack] Get-Culture
- [WayBack] PSMemberTypes Enum (System.Management.Automation) | Microsoft Docs
- [WayBack] Update-TypeData
-Process
:- [WayBack] DateTime Constructor (Int32, Int32, Int32) (System)
- [WayBack] Get-Hotfix cmdlet will not return dates
- [WayBack] Get Hotfixes on Server 2008 Powershell – Super User
- [WayBack] Region specific date formats – Incorrect InstalledOn date from Get-Hotfix
- [WayBack] Topic: Modifying PowerShell script for listing latest windows update on each servers
- [original WayBack] and since Idera loves link-rot, it took me quite a bit of effort to find [WayBack] Get-HotFix and get-WmiObject Win32_QuickFixEngineering missing InstalledOn property – PowerShell General – Ask the Experts – IDERA Community
- [Archive.is] Powershell Get Hotfix Script – administrator.de
PSBase
:
–jeroen