running a script to setup new computer from usb drive

by Apr 8, 2011

OK, I admit I am a newbie so I apologize in advance if this is a stupid question.

I get new computers in and have to configure it for a new user. I am working on a powershell script that automates all the basic stuff I have to do.

I need to be able to plug in a USB drive and run the script (maybe from a batch file).

The powershell script is not bothering me, but getting it to run is tough.

I have to run set-executionpolicy remotesigned from a batch file and make sure it is runs an an admin. Runas won't work and I tried another utility 'cpau' and it doesn't seem to work either. After I get that to work I will have to run the ps script as an admin also.

Any ideas or thoughts? Maybe I am just making this WAY to hard.

Thanks in advance for you help!

Jeremy