In my following code, I want it to output each AD group. However, it is only outputting the last AD group listed in the text file. How can I output each AD group?
$ADs = Get-Content -Path C:\Users\username\Documents\EditADGroupNotes.txt
foreach ($AD in $ADs){
$ADGroup = Get-ADGroup -Identity $ADs | select name
}
@olaf answered this.
Changed to: