<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Windows Last Logon against a .csv file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Last-Logon-against-a-csv-file/m-p/355300#M64959</link>
    <description>&lt;P&gt;Hi WPDITSec,&lt;BR /&gt;
you have to create a lookup with the user_names list, possibly using as column name the same name of the field in your logs (e.g. USERNAME ).&lt;BR /&gt;
After you could run a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog eventtype=windows_logon_success [ | inputlookup user_name.csv | fields USERNAME ]
| stats latest(_time) AS last_logon_time BY USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you have only to define the time period of your search (e.g. last week)&lt;/P&gt;

&lt;P&gt;Put attention to the case of USERNAME: if you have the dubt that there could be differences between upper and lower case, you have to modify the above search (it's slower!)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog eventtype=windows_logon_success 
| eval USERNAME=upper(USERNAME)
[ | inputlookup user_name.csv | eval USERNAME=upper(USERNAME) | fields USERNAME ]
| stats latest(_time) AS last_logon_time BY USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 11:29:46 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-11-08T11:29:46Z</dc:date>
    <item>
      <title>Windows Last Logon against a .csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Last-Logon-against-a-csv-file/m-p/355299#M64958</link>
      <description>&lt;P&gt;I am trying to search for a list of users Last Logon to Windows through SPLUNK... for an individual user I use the search&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;USERNAME&lt;/EM&gt; logon eventtype=windows_logon_success |table User_time&lt;/P&gt;

&lt;P&gt;However, I am trying to do this for around 300 users.. is there a way to do this on bulk by importing a lookup .csv file and getting the search to look at the username &amp;amp; export a new list with the last logon date populated?&lt;/P&gt;

&lt;P&gt;Any help would be great&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:39:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Last-Logon-against-a-csv-file/m-p/355299#M64958</guid>
      <dc:creator>WPDITSec</dc:creator>
      <dc:date>2020-09-29T16:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Last Logon against a .csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Last-Logon-against-a-csv-file/m-p/355300#M64959</link>
      <description>&lt;P&gt;Hi WPDITSec,&lt;BR /&gt;
you have to create a lookup with the user_names list, possibly using as column name the same name of the field in your logs (e.g. USERNAME ).&lt;BR /&gt;
After you could run a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog eventtype=windows_logon_success [ | inputlookup user_name.csv | fields USERNAME ]
| stats latest(_time) AS last_logon_time BY USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you have only to define the time period of your search (e.g. last week)&lt;/P&gt;

&lt;P&gt;Put attention to the case of USERNAME: if you have the dubt that there could be differences between upper and lower case, you have to modify the above search (it's slower!)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog eventtype=windows_logon_success 
| eval USERNAME=upper(USERNAME)
[ | inputlookup user_name.csv | eval USERNAME=upper(USERNAME) | fields USERNAME ]
| stats latest(_time) AS last_logon_time BY USERNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 11:29:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Last-Logon-against-a-csv-file/m-p/355300#M64959</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-08T11:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Last Logon against a .csv file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Last-Logon-against-a-csv-file/m-p/355301#M64960</link>
      <description>&lt;P&gt;Why not do it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; logon eventtype=windows_logon_success User_time=* |stats latest(User_time) by userName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where userName is whatever the userName field is in your data.  No need for a lookup if I’m following your question correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 11:55:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Last-Logon-against-a-csv-file/m-p/355301#M64960</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-11-08T11:55:37Z</dc:date>
    </item>
  </channel>
</rss>

