<?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 convert msDS-UserPasswordExpiryTimeComputed in date? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622150#M216259</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;From splunk search how to convert "msDS-UserPasswordExpiryTimeComputed" value recover from AD in date ? I wish to convert the value&amp;nbsp; with splunk command in date.&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 27 Nov 2022 16:16:30 GMT</pubDate>
    <dc:creator>Stitif</dc:creator>
    <dc:date>2022-11-27T16:16:30Z</dc:date>
    <item>
      <title>How to convert msDS-UserPasswordExpiryTimeComputed in date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622150#M216259</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;From splunk search how to convert "msDS-UserPasswordExpiryTimeComputed" value recover from AD in date ? I wish to convert the value&amp;nbsp; with splunk command in date.&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 16:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622150#M216259</guid>
      <dc:creator>Stitif</dc:creator>
      <dc:date>2022-11-27T16:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert msDS-UserPasswordExpiryTimeComputed in date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622151#M216260</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251653"&gt;@Stitif&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;did you tried using eval strftime?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| eval "msDS-UserPasswordExpiryTimeComputed"=strftime("msDS-UserPasswordExpiryTimeComputed","%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;One additional info: don't use "-" in fied names, otherwise you need to use quotes because this char ir considered by Splunk the as minus, instead use "_".&lt;/P&gt;&lt;P&gt;If you have from the source, rename it.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2022 10:44:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622151#M216260</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-26T10:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert msDS-UserPasswordExpiryTimeComputed in date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622153#M216262</link>
      <description>&lt;P&gt;Unfortunately not. The value of&amp;nbsp;msDS-UserPasswordExpiryTimeComputed is a "LargeInteger Date". Through the &lt;A href="https://ldapwiki.com/wiki/LargeInteger%20Date" target="_self"&gt;link&lt;/A&gt;&amp;nbsp; an exemple is shared but I don't interprate the value as exemple.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2022 11:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622153#M216262</guid>
      <dc:creator>Stitif</dc:creator>
      <dc:date>2022-11-26T11:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert msDS-UserPasswordExpiryTimeComputed in date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622179#M216268</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;LargeInteger Date is a 64-bit value that represents the number of 100-&lt;/SPAN&gt;&lt;A class="" href="https://ldapwiki.com/wiki/Nanosecond" target="_blank" rel="noopener"&gt;nanosecond&lt;/A&gt;&lt;SPAN&gt; intervals that have elapsed since 12:00 A.M. January 1, &lt;/SPAN&gt;&lt;A class="" href="https://ldapwiki.com/wiki/Year%201601" target="_blank" rel="noopener"&gt;1601&lt;/A&gt; &lt;A class="" href="https://ldapwiki.com/wiki/Coordinated%20Universal%20Time" target="_blank" rel="noopener"&gt;Coordinated Universal Time&lt;/A&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;A class="" href="https://ldapwiki.com/wiki/UTC" target="_blank" rel="noopener"&gt;UTC&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In other words, it is&amp;nbsp;&lt;SPAN&gt;11644473600 * 10000 larger than the same representation in SPL. (&lt;A href="https://stackoverflow.com/questions/6161776/convert-windows-filetime-to-second-in-unix-linux" target="_blank" rel="noopener"&gt;Convert Windows Filetime to second in Unix/Linux&lt;/A&gt;.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval spl_time_100ns = tonumber('msDS-UserPasswordExpiryTimeComputed') - 116444736000000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is still in 100 ns. &amp;nbsp;You can convert to second, too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval spl_time_s = tonumber('msDS-UserPasswordExpiryTimeComputed')/10000 - 11644473600&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 06:24:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622179#M216268</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-27T06:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert msDS-UserPasswordExpiryTimeComputed in date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622194#M216278</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251653"&gt;@Stitif&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;could you share a sample of your logs?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 11:24:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622194#M216278</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-27T11:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert msDS-UserPasswordExpiryTimeComputed in date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622206#M216285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By powershell I check Active Directory attribute of target user thanks to the following command :&lt;BR /&gt;get-aduser &amp;lt;targetUser&amp;gt; -Properties msDS-UserPasswordExpiryTimeComputed | select-object "msDS-UserPasswordExpiryTimeComputed"&lt;/P&gt;&lt;P&gt;msDS-UserPasswordExpiryTimeComputed&lt;BR /&gt;-----------------------------------&lt;BR /&gt;133008713865298786&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So I use &lt;U&gt;[datetime]::FromFileTime()&lt;/U&gt; to transform into date :&lt;/P&gt;&lt;P&gt;get-aduser &amp;lt;targetUser&amp;gt; -Properties msDS-UserPasswordExpiryTimeComputed | select-object @{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}&lt;/P&gt;&lt;P&gt;I got this output :&lt;BR /&gt;ExpiryDate&lt;BR /&gt;--------------&lt;BR /&gt;28.06.2022 08:29:46&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Side splunk I recover the input as well, I select target user with command :&lt;BR /&gt;index=&amp;lt;apps_index&amp;gt; &amp;lt;targetUser&amp;gt; | &lt;U&gt;eval spl_time_s = tonumber('data.msDS-UserPasswordExpiryTimeComputed')/10000 - 11644473600&lt;/U&gt;&lt;BR /&gt;| table data.samAccountName,data.msDS-UserPasswordExpiryTimeComputed,spl_time_s&lt;/P&gt;&lt;P&gt;I got this input :&lt;BR /&gt;data.samAccountName | data.msDS-UserPasswordExpiryTimeComputed | spl_time_s&lt;BR /&gt;&amp;lt;targetUser&amp;gt; | 133008713865298786 | 13289226912929.879&lt;/P&gt;&lt;P&gt;I try to get recover side splunk date with day month year.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried the same exercise with another AD attribute. LastLogonDate where the date is &lt;STRONG&gt;already&lt;/STRONG&gt; in the good format&lt;BR /&gt;get-aduser &amp;lt;targetUser&amp;gt; -Properties lastlogondate | select-object lastlogondate&lt;/P&gt;&lt;P&gt;lastlogondate&lt;BR /&gt;-------------&lt;BR /&gt;29.04.2022 08:30:00&lt;/P&gt;&lt;P&gt;Side splunk I display by a table data:&lt;BR /&gt;index=&amp;lt;apps_index&amp;gt; &amp;lt;targetUser&amp;gt;&amp;nbsp; | table data.samAccountName,data.LastLogonDate&lt;/P&gt;&lt;P&gt;data.samAccountName | data.LastLogonDate&lt;BR /&gt;&amp;lt;targetUser&amp;gt; | /Date(1651213800071)/&lt;/P&gt;&lt;P&gt;I don't find the expression to display the date correctly for both attributes&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Stitif&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 19:00:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-msDS-UserPasswordExpiryTimeComputed-in-date/m-p/622206#M216285</guid>
      <dc:creator>Stitif</dc:creator>
      <dc:date>2022-11-27T19:00:53Z</dc:date>
    </item>
  </channel>
</rss>

