Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

PowerShell help

$
0
0

Good morning and TGIF! (posting this on Ben's behalf while we help get his Community account working).

I can’t seem to find the answers to two questions I have:

1. How to get a PS script to run *after* a specific scheduled task has run

2. How to fix my PS script to report just the *last* instance of a string in a file that has several instances of that string

If you can provide any guidance I’d be most appreciative.

Here’s the scenario.

I have a scheduled task (MS Server 2012 SP1) that runs a task to synch data between it and another server. This task always runs, but the actual synch sometimes fails for various reasons, and I need to know when it succeeds and when it doesn’t. I have the scheduled task set up like this:

(Full argument: -ExecutionPolicy Bypass D:\PS_Scripts\...


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>