Avatar of ivan rosa
ivan rosa
Flag for United States of America asked on

Getting members from AD

Hello Folks,

I'm trying to get all users from an active directory GroupMember, I have the following script

get-adgroupmember "TEX_Users" -recursive | % {
    get-aduser $_ -Properties Employeeid | select Name | Out-File -FilePath C:\Window.000\users.txt
}

Open in new window


When deploying script within the PS console i get the users from that group, although for some with a long name i get something like
john doe smit ...

when I try to export it to a file or CSV, it only shows me one user ...

can anybody suggest me what the error might be or if they have a better script that would also work out...

thanks for looking
PowershellScripting Languages

Avatar of undefined
Last Comment
ivan rosa

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
ivan rosa

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23