Thanks, I have the script working now.
Great script btw!

There is one problem with deploying profiles with this script; some of our users have an extra shared mailbox in their outlook profile, (added to the profile in tools, services, exchange, advanced, etc.) and some users have a personal folder which is located on the network in their homedir.

Is it possible to define the extra mailbox in the outlook.prf? If not does anyone have a possible workaround for this and the personal folders issue?