<?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 How to search in active directory for servers connected in the last 14 days? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-active-directory-for-servers-connected-in-the/m-p/627648#M218088</link>
    <description>&lt;P&gt;Hello and happy new year to all,&lt;/P&gt;
&lt;P&gt;As the title says I would like to have the list of servers that have connected over the last 14 days (Lastlogon)... I have tried several methods but nothing works, here is my query :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;index=msad&amp;nbsp; SamAccountName=*$ VersionOS="Windows Server*"&lt;BR /&gt;| eval llt=strptime(LastLogon,"%d/%m/%Y %H:%M:%S")&lt;BR /&gt;| eval LastLogon2=strftime(llt, "%d/%m/%Y %H:%M:%S")&lt;BR /&gt;| rex field=SamAccountName mode=sed "s/\$//g"&lt;BR /&gt;| table Domain,SamAccountName,VersionOS,LastLogon2&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 21:18:35 GMT</pubDate>
    <dc:creator>numeroinconnu12</dc:creator>
    <dc:date>2023-01-19T21:18:35Z</dc:date>
    <item>
      <title>How to search in active directory for servers connected in the last 14 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-active-directory-for-servers-connected-in-the/m-p/627648#M218088</link>
      <description>&lt;P&gt;Hello and happy new year to all,&lt;/P&gt;
&lt;P&gt;As the title says I would like to have the list of servers that have connected over the last 14 days (Lastlogon)... I have tried several methods but nothing works, here is my query :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;index=msad&amp;nbsp; SamAccountName=*$ VersionOS="Windows Server*"&lt;BR /&gt;| eval llt=strptime(LastLogon,"%d/%m/%Y %H:%M:%S")&lt;BR /&gt;| eval LastLogon2=strftime(llt, "%d/%m/%Y %H:%M:%S")&lt;BR /&gt;| rex field=SamAccountName mode=sed "s/\$//g"&lt;BR /&gt;| table Domain,SamAccountName,VersionOS,LastLogon2&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 21:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-active-directory-for-servers-connected-in-the/m-p/627648#M218088</guid>
      <dc:creator>numeroinconnu12</dc:creator>
      <dc:date>2023-01-19T21:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in active directory for servers connected in the last 14 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-active-directory-for-servers-connected-in-the/m-p/627652#M218089</link>
      <description>&lt;P&gt;You created the llt field, but didn't do anything with it.&amp;nbsp; Use the &lt;FONT face="courier new,courier"&gt;relative_time&lt;/FONT&gt; function to see how old llt is.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=msad  SamAccountName=*$ VersionOS="Windows Server*"
| eval llt=strptime(LastLogon,"%d/%m/%Y %H:%M:%S")
| where llt &amp;gt; relative_time(now(), "-14d")
| rex field=SamAccountName mode=sed "s/\$//g"
| table Domain,SamAccountName,VersionOS,LastLogon&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 21:37:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-active-directory-for-servers-connected-in-the/m-p/627652#M218089</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-19T21:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in active directory for servers connected in the last 14 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-active-directory-for-servers-connected-in-the/m-p/627702#M218101</link>
      <description>&lt;P&gt;&lt;FONT&gt;thank you very much, it's works&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 08:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-active-directory-for-servers-connected-in-the/m-p/627702#M218101</guid>
      <dc:creator>numeroinconnu12</dc:creator>
      <dc:date>2023-01-20T08:50:38Z</dc:date>
    </item>
  </channel>
</rss>

