When you maintain a number of servers which require to trigger the same scheduled task manually, you can simplify the process by triggering the scheduled task remotely.
In this example, I assume that the script is being executed on a dedicated management server (aka job server) within an Exchange Server 2013 environment. The scheduled task must exist on all servers having the same name.
Create a simple PowerShell script at a file location of your choice (i.e. D:ScriptsStart-RemoteScheduledTasks.ps1)
$cimSession = New-CimSession -ComputerName SERVER1,SERVER2,SERVER3,SERVER4Start-ScheduledTask TASKNAME -CimSession $cimSessionRemove-CimSession $cimSession
Now create a new shortcut on your server desktop with the following configuration:
Target: C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command „& D:ScriptsStart-RemoteScheduledTasks.ps1“
If required, select „Run as Administrator“ in Shortcut -> Advanced settings.
This post has been published originally on my legacy blog SF-Tools.