Find latest log file and out put line as Properity

Good morning all im looking for some help,

At present we are rolling out a new setting on laptops. This generates a log file here C:\Logs\setapn

The setting is applied via GPO so generates a log file every day. There fore i need the relevance to find the latest log file created and check for the following :

APN profile SGN applied successfully or APN profile SGN found nothing to do and out put these as a property within the console so i can run a report.

Im struggling as i dont really have a lot of experience with relevance.

I’ve had some success using the following relevance

following texts of firsts “APN profile” of lines whose (it contains “APN profile”) of files whose (modification time of it = maximum of modification times of files whose (name of it ends with “.log”) of folder “C:\Logs\setapn”) of folder “C:\Logs\setapn”

However i really need to be able to define the following lines in the property field

APN profile SGN applied successfully or APN profile SGN found nothing to do

Should there be only one of these lines or will there be multiple occurrences of this line in your log file?

1 Like