Solved

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

Posted on 2016-09-25
2
52 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Synchronize a new Active Directory domain with an existing Office 365 tenant
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.…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

863 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

22 Experts available now in Live!

Get 1:1 Help Now