?
Solved

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

Posted on 2016-09-25
2
Medium Priority
?
77 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 1000 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 1000 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

Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
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 …
Suggested Courses

752 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