need script for running 3 command line commands on startup

by harry289 at 2013-01-28 22:32:07

hi,

I am a newbie to system administration. I need help on writing a powershell script to execute 3 commands that I manually run everytime whenever the server starts up / reboot. I want to automate this process by writing a script. Please help me.


"C:\Program Files\TrueCrypt\TrueCrypt.exe" /v "\Device\HarddiskVolume1" /l "A" /p "password" /q
"C:\Program Files\TrueCrypt\TrueCrypt.exe" /v "\Device\HarddiskVolume2" /l "B" /p "password" /q
"C:\Program Files\TrueCrypt\TrueCrypt.exe" /v "\Device\HarddiskVolume3" /l "C" /p "password" /q

Thank you.
by nohandle at 2013-01-29 02:42:30
Are you familiar with Windows Scheduled Tasks? Create new scheduled task to run on startup and run the script calling <path to powershell.exe> -ExecutionPolicy Bypass -File "<path to the script>.ps1"