Solved

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

Posted on 2016-09-25
2
73 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

717 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