Quantcast
Channel: General Discussion
Viewing all articles
Browse latest Browse all 204

Logparser select newest 2 files for log location

$
0
0

Hello Experts!

Would like to ask how can I get the latest files from IIS logs to just get the newest 2 files. I'm asking this because I don't want my Activesync script to generate a report for all of existing log files from the IIS folder. Not sure how this is done but appreciate if you advise what would be the best approach on getting IIS logs.

So far here's the portion of the script where I want to limit inclusion:

$Destination + "' FROM  'D:\Logs\*.log' WHERE cs-uri-stem LIKE '%Microsoft-Server-ActiveSync%' GROUP BY DeviceType ORDER BY Hits, DeviceType DESC"

Thanks in advance!

Cheers,

Reynald


Viewing all articles
Browse latest Browse all 204

Trending Articles



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