I have a txt file with a list of a jillion or so computers. What I'm trying to do is simply get the date of the last time Windows Update was run on each machine, so 1 line per machine.
I started out with this, which of course didn't work:
$computers=Get-Content-path allDesktops.txt Get-hotfix-ComputerName$computers|sortinstalledon-desc|selectinstalledon-first1
Instead of getting 1 entry per computername, I'm only getting 1 entry altogether. How can I limit it so I get the last installedon date for each machine?
Thanks! Powershell is great, I'm way behind the curve just now trying to get into it :)
-Mike