Not a script but... (all one line)
adfind -gcb -f "samaccounttype=805306368" samaccountname -owner -resolvesids
If you want it in csv format, add -csv
You can get adfind at this link
http://www.joeware.net/freetools/tools/adfind/index.htm
--
Joe Richards Microsoft MVP Windows Server Directory Services
Author of O'Reilly Active Directory Third Editionwww.joeware.net
---O'Reilly Active Directory Third Edition now available---
http://www.joeware.net/win/ad3e.htm
- Show quoted text -