Hi Guys,
Pretty new to powershell here and was just learning it using the Morelunches book on Powershell and came upon one of the labs in chapter 9 that got me a bit confused. The commands are supposed to filter out computers on the domain and retrieve all hot-fixes on them. In the lab, it says that the follow command lines are supposed to be equivalent but when I run the second string, it only reports the hotfixes on the local machine… Can anyone shed some light on why this is?
First command:
Get-Hotfix -computerName (get-adcomputer -filter * | Select-Object -expand name)
Second command:
get-adcomputer -filter * | Select-Object @{l='computername';e={$_.name}} | Get-Hotfix
Thanks in advance for all your help!!
Leonard