When using either of the above, most of my HotFixes show no InstalledOn or InstalledDate
However when I look in Control Panel > Programs and Features > View Installed Updates
they all show an Installed On date
I want to collect this information from local/remote computers and will therefore use the WMI option in my environment, but I need to retrieve the InstalledOn
If the above has a bug perhaps I need to go looking around in the registry,
any help most appreciated
I found that InstalledOn is a script paramter defined by the following:
In my case, my locale is set as en-GB (UK locale) however, upon checking the values for InstalledOn the dates were formatted in mm/dd/yyyy, causing an error in parsing the string value to a datetime property with the parse method (as seen above which the scriptproperty is based on), hence the InstalledOn property appears empty. Here's what I did to work around this:
FYI I did this all on one line but sometimes on this forum if the line is too long it will go off screen so I separated it onto multiple lines.
Thanks very much Pyro3113 it works a treat.
I was using a regex to switch the MM/DD to DD/MM but after the select, I think this was my issue as although it would sorted out the dates for the ones I did manage to retrieve it did not help on the ones did not.
I really like the use of
That is very elegant, great peace of code, thanks
I learned about the static parse method of the datetime type from NoHandle on this forum, I then learned about the [System.Globalization.CultureInfo]::GetCultureInfo (I believe from one of the excellent tips posted out by this site or possible Ed Wilson blog) e.g.
But I was not sure how/when to put them together to solve a problem, new we have a live example.
Nice one, thanks again