Sometimes you may want to create or work with scheduled tasks on remote computers running on Windows. For example, you may want to create a scheduled task on a remote computer then use your computer to manipulate it as and when you require without needing to physically go to the remote computer. The following article shows you how you can run scheduled task on remote computer.
1. You Must Ensure the Following Before You Begin
Your computer and the remote computer must be part of a domain or a Workgroup
You must know the IP Address of the remote computer
You must have the login credentials for the remote computer and the login credential must be part of the Administrators group on the remote computer.
You may want to ensure that your Firewall allows “Remote Scheduled Tasks Management” – Screenshot below.
2. Creating or Managing a Scheduled Task on a Remote Computer
- Open Task Scheduler Windows Interface (On Windows 7: Start | Type “Task Scheduler” in search field.)
- Right click on Task Scheduler | Click on “Connect to Another Computer”
- Supply the IP Address of the remote PC | Select “Connect as another user:” and click on “Set User”
- Enter the username and password for the remote PC you want to connect to.
You now have access to the Tasks Scheduler in the remote PC and are able create new tasks or manipulate the existing tasks on the remote PC.
3. Run Scheduled Task with Powershell
Run the following in Powershell with appropriate permissions: schtasks /run /s ComputerName /tn "description"
If you want to loop it so it runs manually every 30 minutes, run the following:
#When the counter reaches 30, that’s 15 hours $counter = 0
schtasks /run /s ComputerName /tn "description"
“$counter – Running script”
} While ($counter –lt 30)
Also consider using Action1 to run scheduled task on remote computer if:
- You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
- Some of your endpoints are laptops not connected to corporate network at all times.
Action1 is a cloud-based platform for software deployment, software/hardware inventory, patch management, endpoint configuration and more. It is free with basic functionality.