I get a .csv file export from my security office that has a list of computer host names in column A, and a list of applications that require my attention (Updates usually).
I'd like a powershell command to look at the CSV file column A, then take those computer names and provide me a new .CSV file that shows the computer names along with the computer description, computer name and last login.
I have the following, but I know it's wrong. What I think it's doing is ignoring my CSV file and running the command against every PC in the domain....
Import-Csv -Path C:\Script\CName.csv | Get-ADComputer -Filter * -Properties * | Sort LastLogonDate | FT Name, LastLogonDate -Autosize | Out-File C:\script\Export.csv