Skip to content

Instantly share code, notes, and snippets.

@kayasax
Last active March 9, 2021 10:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kayasax/937c4541b37aaa7c8471 to your computer and use it in GitHub Desktop.
Save kayasax/937c4541b37aaa7c8471 to your computer and use it in GitHub Desktop.
get-hotfix2 correct missing intalledon date of get-hotfix cmdlet (credits to http://powershell.com/cs/forums/p/12409/21917.aspx#21917 http://powershell.com/cs/members/PeterJurgens/default.aspx)
function get-hotfix2{
param($computername)
#$PSBOundParameters
Get-HotFix @PSBOundParameters |
Select-Object description,hotfixid,installedby, @{l="InstalledOn";e={[DateTime]::Parse($_.psbase.properties["installedon"].value,$([System.Globalization.CultureInfo]::GetCultureInfo("en-US")))}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment