I have a list of hundreds od computers selected from my domain. I would like to make a report that shows up in which OU
are all of them. I found out that this cmdlet can perform the task I need:
PS C:\Users\digiacomo.a-rti> Get-ADComputer "FIDS156041" -Properties DistinguishedName
but instead of a single computer FIDS156041
, I want to pass to it as a parameter, a (txt or csv) file containing my list of computers, and if possible, output the result in another file that contains two columns: computer names and their OU
. Is it possible? How can I do it?
Thank you very much in advance for your help!