Get-content -path z:\path\name.txt | foreach { (get-hotfix -Computername $_ | Sort-object IUnstalledon)[-1] } ------------------- I would like to count and place the count in front of the (get-hotfix in the output) 1 computer-name update ncncncncn cncncncncncn date time 2 computer name.....