I have an SQL Server 2008 database, run on a 64-bit Windows Server 2008. I created a pretty simple PowerShell script that automates a bunch of tasks. I would like this script to run as part of our maintenance plan. How do I schedule it to run?
It needs to run as administrator - I know this is not ideal, but I am hoping I can have it execute as administrator. I currently open PowerShell as administrator and execute the script manually every morning.
In case it matters, the script:
- Zips the backup file (7-Zip) and moves it to our backup location
- Juggles some files - keeping the latest backup in a particular network location, and moving what was the most recent backup into the number two spot
- Deletes the .bak files
I want the script to run without counting on me to run it.