Hello,
I am trying to write a one-liner for my team to search multiple domains listed in a column with CSV file titled "Domain". I am not sure if I should be using Import-Csv or Get-Content, but this is the command line I have come up with so far. This command pulls the "identity" provided but on the default domain and not the domains listed in the CSV.
Any Help would be greatly appreciated.
Get-Content "H:\posh\MetroDomains.csv" | foreach{Get-QADUser -Identity '<username>' -Credential $admincreds.<account> -Domain $_.Domain} | select name,NTAccountName