<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> wrote: > On Tue, Jan 16, 2018 at 4:31 PM, Matt Stork <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:listsadmin@lists.myitf >> orum.com] On Behalf Of Kurt Buff >> Sent: Tuesday, January 16, 2018 2:51 PM >> To: ntsysadm <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> >> 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 , 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) >> > >> >> >> >