Page tags

Add a new page

Sometimes you want to run a powershell script with different credentials in form of a scheduled task.
I know that you could also encrypt the password etc but if you work on a locked down user it is not always working the way you like or suspect.Here is a simple scheduled task that I run with alternate credentials and have it start a powershell script which in his turn will run with encrypted passwords:

powershell -command &{powershell c:\temp\excel2.ps1}

this script will grab freediskspace and saves it into an excel file, if I don't run this as a admin user it will prompt me with every server again and again

If you want to see all the scheduled task on different servers throughout the domain, I made a script for that purpose: