Get Computers with a specific names and export to CSV file

Get-ADComputer -Filter * | Where-Object {$_.Name -like "NPI*"} | Select -Property Name | Sort Name | Export-Csv -Path "c:\data.csv"

© selimatmaca.com. All Rights Reserved.