Isn’t Get-WULastInstallationDate giving you what you’re looking for? On my system it gives me a date like so:
Wednesday, January 10, 2018 6:06:35 AM -- There are 10 kinds of people in the world... those who understand binary and those who don't. ¯\_(ツ)_/¯ From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Michael Leone Sent: Wednesday, January 17, 2018 11:54 AM To: ntsysadm@lists.myitforum.com Subject: Re: [NTSysADM] Using PS to query date of latest Windows Updates installed On Wed, Jan 17, 2018 at 11:33 AM, Webster <webs...@carlwebster.com<mailto:webs...@carlwebster.com>> wrote: And you are running from an elevated PoSH session? Yes, I did a run as administrator, and got the same result. Webster From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>] On Behalf Of Michael Leone Sent: Wednesday, January 17, 2018 10:27 AM To: ntsysadm@lists.myitforum.com<mailto:ntsysadm@lists.myitforum.com> Subject: Re: [NTSysADM] Using PS to query date of latest Windows Updates installed <SIGH> PS P:\software\PHA Scripts> Get-Help Get-WULastResults NAME Get-WULastResults SYNOPSIS Get Windows Update results. SYNTAX Get-WULastResults [-ComputerName <string[]>] [-Debuger <SwitchParameter>] [-PSWUSettings <Hashtable>] [-SendReport <SwitchParameter>] [<CommonParameters>] DESCRIPTION Use Get-WULastResults cmdlet to get Windows Update LastSearchSuccessDate and LastInstallationSuccessDate. RELATED LINKS Author Blog http://commandlinegeeks.com/ REMARKS To see the examples, type: "get-help Get-WULastResults -examples". For more information, type: "get-help Get-WULastResults -detailed". For technical information, type: "get-help Get-WULastResults -full". For online help, type: "get-help Get-WULastResults -online" PS P:\software\PHA Scripts> Get-WULastResults WARNING: To perform some operations you must run an elevated Windows PowerShell console. Get-WULastResults : Object reference not set to an instance of an object. At line:1 char:1 + Get-WULastResults + ~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-WULastResults], NullReferenceException + FullyQualifiedErrorId : System.NullReferenceException,PSWindowsUpdate.GetWULastResults So this cmdlet should return exactly what I am looking for, but for some reason it isn't working for me ... On Tue, Jan 16, 2018 at 4:46 PM, Michael Leone <oozerd...@gmail.com<mailto:oozerd...@gmail.com>> wrote: On Tue, Jan 16, 2018 at 4:31 PM, Matt Stork <mst...@northwestern.edu<mailto:mst...@northwestern.edu>> wrote: I find the Get-WUHistory from the PSWindowsUpdate module provides far more useful information regarding which updates are installed. It has an option -SendReport but the help for the cmdlet does not provide any information on how to use the option. For the purposes of this report, I don't need any more detail than "When were updates last applied?". Thanks, -Matt -----Original Message----- From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>] On Behalf Of Kurt Buff Sent: Tuesday, January 16, 2018 2:51 PM To: ntsysadm <ntsysadm@lists.myitforum.com<mailto:ntsysadm@lists.myitforum.com>> Subject: Re: [NTSysADM] Using PS to query date of latest Windows Updates installed help get-hotfix -full For your purposes this might work, if you have a small number of computers: ( get-hotfix -computername work1, work2, work3 | sort installedon )[-1] Kurt On Tue, Jan 16, 2018 at 12:37 PM, Michael Leone <oozerd...@gmail.com<mailto:oozerd...@gmail.com>> wrote: > I'm drawing a blank on this. I need to query a set of clients, and return > the date that Windows Updates was last run (date updates were installed). > Then I will email this to the appropriate person. > > I'm finding lots of ways to query for the list of needed updates, or a list > of the installed updates, but not for the last date/time when updates were > actually installed. Clue/pointer, anyone? I remember something about a user > created WSUS module that might have that as a function, but for the life of > me, I'm not finding it. > > Thanks > > (I originally sent this to the > powersh...@lists.myitforum.com<mailto:powersh...@lists.myitforum.com> , but > it said > I didn't have permission to post there. Dunno why, I used to be able to post > there .. and the return message didn't include instructions on how to sign > back up) >