$Computers = Get-ADComputer -Filter * -properties Name, OperatingSystem, OperatingSystemVersion, LastLogonDate, whenCreated $ComputerList = foreach ($_ in $Computers) { [PSCustomObject] @{ Name = $_.Name OperatingSystem = $_.OperatingSystem OperatingSystemVersion = $_.OperatingSystemVersion LastLogonDate = $_.LastLogonDate WhenCreated = $_.WhenCreated } } $ComputerList | Group-Object -Property System | Format-Table -Property Name, Count $ComputerList | Format-Table -AutoSize