PowerShell script to monitor objects - you may already have one

In Progress Posted 3 years ago Paid on delivery
In Progress Paid on delivery

Hello. I am needing a PowerShell script that would monitor different objects based on criteria in a file.

Here is an example. I would like to be able to define an entry that would take an action in the following form:

Scenario 1:

Monitor a folder in the following location: c:\program files (x86)\fruit

Check to see if there are any *.html files and if they are more than 90 minutes old. If yes, then take an action - email via SMTP mail relay.

Scenario 2:

Monitor a folder in the following location: \\computername\bags

Check to see if there are any *.txt files and if they are more than 10 minutes old. If yes, then take an action - run a program (it would invoke a program basically but it does not need to wait for it to finish).

If you can create a PS script that would read from an external file so that I can have multiple entries. A vertical line or pipe symbol can be a delimiter. I plan to have multiple lines. This can be in any format if you have a preference - plain text/JSON/XML/..etc. An example of multiple entries would be:

Folder location (local or UNC accepted)|what extensions to monitor|aging in minutes|action to take

c:\program files (x86)\fruit|*.html|90|Email

\\computername\bags|*.txt|10|Runaprogram

So, it can have multiple functions and one would be Email. I can add more later as needed. Email would take the variables data and this would also create a log file of the process whenever it is run. I will set this in a scheduled task for now.

Logging is essential here. It helps with troubleshooting and if organized enough, I will ingest it into my logging server.

Please ask as many questions as I would prefer this to be right the first time so neither of us loses any time.

I am open to any other suggestions if you have another idea on how to tackle this or if you have already done this and can modify existing code to make this work.

Thank you

Shell Script Powershell Software Architecture C Programming C# Programming

Project ID: #29535548

About the project

6 proposals Remote project Active 3 years ago

6 freelancers are bidding on average $191 for this job

writingapp

Hi. I have written many automation PowerShell scripts. Ready to write your project. Will complete within 2 days

$180 USD in 2 days
(98 Reviews)
5.8
AhmadSameer

Hey there, I have been working with MS Windows systems for years. I had developed dozens of PowerShell scripts. Are there more scenarios you'd like to implement? Regards!

$250 USD in 7 days
(27 Reviews)
5.3
fchorley99

Hi, Anything I have to monitor folders is using FileSystemWatcher to pick up changes. This wouldn't be appropriate since you'd like to keep an eye on files that aren't changing. This might be fairly common. What you More

$350 USD in 14 days
(3 Reviews)
2.5
Manpreetsweden

Hello. I am a batch script expert and have experiences in creating scripts for various purposes. I think I can create one for your intention. I hope to discuss more thorough chatting. Manpreet S.

$100 USD in 4 days
(0 Reviews)
0.0
kemedjiokenlefa9

Hi ,as an oracle expert and i perform many scripting operations and I read your requirements and try it on my computer .I am a good person to meet your requirements . Hire me and let me do it for you

$115 USD in 2 days
(0 Reviews)
0.0