Yeah that UDF should do the trick. You could place that in a TS-logonscript. If you have problems in actually creating the script, just ask.