Hello; I found script online which will allows me to query an OU and get the list of users, which I getting but since in this company uses nj2334894783 as user ID. I got a list of user IDs but don't know who they are.

Can someone help me enter missing code to get the user name and last name?



Dim $Filter[0]
$Filter[0]="Group" ; Or replace "Group" with "User" or "Computer"

$ou = GetObject("LDAP://cn=users,dc,test,dc=local")
$ou.Filter = $Filter

For Each $UserOrGroupOrComputer in $ou
? $UserOrGroupOrComputer.Name
Next