I needed to list all computers in use at customers, with os, and for the less diligently maintained AD’s also if they were still in use. You can obtain this by reading the value of lastlogondate of a machine account.
Get-ADcomputer -Filter * -Properties * | Sort LastLogonDate | FT Name, LastLogonDate, OperatingSystem