The sample scripts are not supported under any N-able support program or service. The sample scripts are provided AS IS without warranty of any kind, and N-able expressly disclaims all implied warranties including, warranties of merchantability or of fitness for a particular purpose. In no event shall N-able or any other party be liable for damages arising out of the use of or inability to use the sample scripts.

Monitor Most Recent File in Folder for Age - NC

Last Modified Date

1/15/2021 7:53 PM

Description

This was built during the January 2021 Automation Office Hours. It is an automation policy for N-Central that can be created into a custom service 


The purpose of the script is to look in a selected folder and look for the age of the most recent file.

Type

Custom Service / Script Check

Category

Windows File System

Target OS

Windows 8/8.1;Windows 10;Windows Server 2012 / 2012R2;Windows Server 2016;Windows Server 2019

Compatible with N-Central

Yes

N-Central minimum version

12.1 sp1

Compatible with RMM

No

Syntax

To use this:
1. import the automation policy to your N-Central server,
2. then go to Administration / Service Management / Custom Services.
3. From there click on Add / Automation Manager Policy
4. in there find the policy that you uploaded in step 1, and go through the tabs to configure the desired inputs/thresholds/scan intervals
5. save the service and use like any other service

Output

The policy outputs 2 parameters. One is the file age, and the other is the full file path of the file found

Keywords

Related Content