Thanks for all the suggestions thus far.
I have decided that for now I'm going to concentrate on all parts of the script except for the extracting of info from the sql database. That can come later as I can easily export the data from within the program now.
But I've also learnt that I'm going to have to have a check in the loop to make sure the samaccount name is unique accross the domain. Then I'll have to decide if it's easier just to have the error reported to the log to deal with or if I can make the script attempt to revise the samaccount name.
Another interesting thing I found out is that though the samaccount needs to be usique, the distinguished name can be repeated. Go figure.
_________________________
---
Bishop Grandin Technology Department
'Either we're on time, or we're late'