Splunk Enterprise

How to find the last change or modification on multiple AD groups?

vttrl123
New Member

I have a csv file containing the SAM accounts of 1200 AD groups and I need to find out the proper search query to find the last date of their modification or change.

Labels (1)
0 Karma

Richfez
SplunkTrust
SplunkTrust
| inputlookup <lookup or filename>
| stats max(<field that's the date field>)

or

| inputlookup <lookup or filename>
| stats max(<field that's the date field>) BY displayName

 

And if you were wanting a more useful way

base search here that returns regular data
| lookup <lookupName> <fieldInLookup> AS <fieldInData> OUTPUT lastUpdate

Which assuming you fix up the lookup name, double-check the fieldInLookup vs. fieldInData order (I always get those backwards!) and change the fieldname 'lastUpdate' to whatever it is in your lookup, will output the lastUpdate for each ... "field" you match on.  Perhaps displayName or something, whatever it is that should match.

This might help:

https://docs.splunk.com/Documentation/SplunkCloud/8.2.2107/SearchReference/Lookup

 

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...