Many thanks for this. Due to my limited experience/knowledge of Powershell at the time, I still struggled with this task. I haven't had to create any AD accounts for a while, but I've been using Powershell for various tasks every day since.
We've just had a bunch of new user requests come in, so I revisited this script. I've got it working now. (Would never have known to use the -Passthru switch).