Posts

Showing posts from December, 2017

Windows Update History Deleted After Sysprep

Image
I've been testing Windows Update History on my virtual machines and noticed that a machine which has had several Windows Updates installed on it was not listing any of them in its Update history: Cause After a little research, I discovered that it was because the updates were installed on my base virtual machine which I then cloned and ran sysprep on to create the test virtual machine.  It seems running sysprep causes the update history to be deleted. If I just clone my base virtual machine and do not run sysprep then look at the Update history, I can see all the installed updates: Related Posts -  Sysprep was not able to validate your Windows installation - Windows 11

Windows Patches Installed On Date Incorrect Format on Windows Server 2012

Image
If you run the following on Windows Server 2012 $patches = get-ciminstance Win32_QuickFixEngineering $patches[0].InstalledOn you get the date the patch was installed on in American date format MM/DD/YY.  PowerShell then converts the DD part of the date into a month so the result is incorrect. If you run the same query on Windows Server 2012 R2, the date is correct If you dig into the code, you can see the issue, here it is in Windows Server 2012 System.Object InstalledOn {     get=if ( [ environment ]:: osversion . version . build -ge 7000 )     {         # WMI team fixed the formatting issue related to InstalledOn         # property in Windows7 (to return string)..so returning the WMI's         # version directly         [ DateTime ]:: Parse( $this . psBase . CimInstanceProperties [ "InstalledOn" ]. Value)     }     else     {         $orig = $this . psBase . CimInstanceProperties [ "InstalledOn" ]. Value