I need to write a script that goes and queries AD for the userWorkstations attribute being populated. Out of the box it's "Not Set". here's what i got so far dsquery * "some path" filter "(&(objectcategory=person)(objectclass=user)(userWorkstations =*))" -attr cn userWorkstations > C:\workstations.txt. This pipes out a text file of all acounts.
Basically i can find users who have this filed populated but i can't find those that do not. Once the report runs, then any account who's value is "not set" would be disabled. Any help is much appreciated.