Solved

Need a way to schedule a powershell commend to run every 10 min. Windows Server 2012.

Posted on 2016-09-25
2
46 Views
Last Modified: 2016-09-26
I need a way to schedule a task that would run the following powershell commend every 10 min.  The commend is resume-replication *. Which should resume for all paused virtual machines. I am not familiar with scripts or scheduling a task in windows server 2012.

resume-replication *
0
Comment
Question by:netcomp
2 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 250 total points
ID: 41815115
Go into the Task Scheduler and create a task. The wizard should be almost straight-forward.
You'll need to set up a starting point, e.g. each day at 08:00, then repeat every 10 minutes.
The action to run is
powershell -ExecutionPolicy ByPass -NonInteractive -Command "resume-replication *"

Open in new window

0
 
LVL 17

Assisted Solution

by:bigeven2002
bigeven2002 earned 250 total points
ID: 41815130
If for some reason using the command parameter doesn't work, then put the resume-replication * into a ps1 file and use the -file parameter to point to the ps1 file.  Be sure it is on a local drive though and not a network drive.  Then have task scheduler run it as the administrators group.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now