Skip to content
Manual
- Open Administrative tools / Task Scheduler or run taskschd.msc
- Under Task Scheduler Library, create a new Folder MIKADO
- Create folder C:\Scripts and copy powershell.exe from C:\Windows\System32\WindowsPowerShell\v1.0
- Create the powershell file we will run: CleanTempFolder.ps1
- Set-Location “C:\Windows\Temp”
- Remove-Item * -recurse -force
- Create a Basic Task
- Name: myTask
- Trigger: Daily and select time and recurrence
- Action: Start a program
- Program/script: C:\Scripts\powershell.exe
- Add Arguments: -Command “. ‘C:\Scripts\CleanTempFolder.ps1’ “
- Set the schedule with:
- Run whether user is logged on or not
- Run with highest privileges
Click to Copy