To create a scheduled task that runs from one of your Exchange servers perform the following steps:
- Open the Task Scheduler by clicking the Windows button and on Windows Administrative Tools | Task Scheduler.
- From the Task Scheduler Library | Action menu, click Create Basic Task.
- Give your task a name and description, and click Next.
- On the Trigger screen, select the how often you'd like the script to run (Daily, Weekly, Monthly, and so on).
- When asked what action you want the task to perform, select Start a Program.
- Use the following syntax in the Program/Script field and click on Next:
-
- C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command ". 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; ...