Welcome to the community.

What have you tried? Please use the </> button in the toolbar to post your code.

You can use Get-ADComputer with the -Filter parameter to find the computers that you want to check, send the computers to a ForEach loop that runs Get-ComputerInfo, and then output the results to CSV with Export-Csv.

1 Spice up