To return the distinguished name for all users in an active directory domain create a new file called getdn.bat
Content:
del c:\activeUsers.txt DSQUERY.exe * -limit 0 -filter "(&(objectCategory=Person)(objectClass=User)(!userAccountControl:1.2.840.113556.1.4.803:=2))" >"c:\activeUsers.txt" C:\WINDOWS\NOTEPAD.EXE c:\activeUsers.txt