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