Get-Aduser DistinguishedName



I have a file on my C drive I named DistinguisheName.csv. The first column has the AD group name and is labeled “GroupName”. Second column is simply named “cn”. I need a script to give me the distinguished name for each of the groups in that sheet please.


What have you tried so far? Please show you code and expalin what’s not working as expected.

@shawnb23 - This is of course doable. You need to use Import-Csv and Get-ADGroup cmdlet. I would suggest to read the help documentation for those cmdlets and start putting some lines of code based on what you understand. You can update this thread when you get stuck or get errors, folks here will help.