I have been trying to understand how to import my csv file and export of specific adgroup they are added or even they are not added
Import-CSV " C:\Users\user.csv" | ForEach-Object { Get-ADGroupMember $_. sAMAcountName -Properties * |Select sAMAcountName } |Export-CSV "c:\Users\userswithgroup.csv"
I dont really understand why its not working what went wrong.