<?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: Is there a command similar to UX &amp;quot;last&amp;quot; to use agains a TS? in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713910#M6929</link>
    <description>Try the following link, it gives an example using WSH.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.windowsitpro.com/Article/ArticleID/15113/15113.html" target="_blank"&gt;http://www.windowsitpro.com/Article/ArticleID/15113/15113.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In case the link goes away though....&lt;BR /&gt;&lt;BR /&gt;Save the following text into file userlogin.vbs&lt;BR /&gt;&lt;BR /&gt;' List last logon times&lt;BR /&gt;' 2001-03-27 John Savill, Jakob Hussfelt &lt;A href="http://www.ntfaq.com" target="_blank"&gt;http://www.ntfaq.com&lt;/A&gt;&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;sEnterDCs = "SAVILLTECH,SAVILLNT02"&lt;BR /&gt;sObjects = Split(sEnterDCs, ",")&lt;BR /&gt;Set oDomain = GetObject("WinNT://" &amp;amp; sObjects(0))&lt;BR /&gt;oDomain.Filter = Array("User")&lt;BR /&gt;WScript.Echo "Showing last login times of accounts from: " &amp;amp; oDomain.Name &amp;amp; vbNewLine&lt;BR /&gt;For Each oDomainItem In oDomain&lt;BR /&gt;  sUsrLogin = oDomainItem.LastLogin&lt;BR /&gt;  If UBound(sObjects) &amp;gt;= 1 Then&lt;BR /&gt;    For ii = 1 To UBound(sObjects)&lt;BR /&gt;      Set oUsr = GetObject("WinNT://" &amp;amp; sObjects(ii) &amp;amp; "/" &amp;amp; oDomainItem.Name &amp;amp; ",user")&lt;BR /&gt;      If oUsr.LastLogin &amp;gt; sUsrLogin Then sUsrLogin = oUsr.LastLogin&lt;BR /&gt;    Next&lt;BR /&gt;  End If&lt;BR /&gt;  WScript.Echo "Username: " &amp;amp; Left(oDomainItem.Name &amp;amp; Space(22),22) &amp;amp; "Last login: " &amp;amp; FormatDateTime(sUsrLogin)&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;In line 'set oDomain = GetObject("WinNT://SAVILLTECH")' you should change SAVILLTECH to your domain name.&lt;BR /&gt;&lt;BR /&gt;To run type the following:&lt;BR /&gt;&lt;BR /&gt;C:\&amp;gt; cscript userlogin.vbs&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jon</description>
    <pubDate>Fri, 20 Jan 2006 12:07:59 GMT</pubDate>
    <dc:creator>Jon Finley</dc:creator>
    <dc:date>2006-01-20T12:07:59Z</dc:date>
    <item>
      <title>Is there a command similar to UX "last" to use agains a TS?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713907#M6926</link>
      <description>I need a command or tool similar to "last" to see on which servers a given user was last logged.&lt;BR /&gt;Either that or, if I run the command on a given server, which users where logged on to that given server.&lt;BR /&gt;&lt;BR /&gt;Thank you much.</description>
      <pubDate>Fri, 20 Jan 2006 06:29:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713907#M6926</guid>
      <dc:creator>Edgar Zapata</dc:creator>
      <dc:date>2006-01-20T06:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a command similar to UX "last" to use agains a TS?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713908#M6927</link>
      <description>I don't know about any native windows command that could do that, but logons are registered to the security event log. If your system is w2k3 based, you could try with eventquery, like this:&lt;BR /&gt;&lt;BR /&gt;eventquery -V -L security /FI "source eq security AND id eq 500".&lt;BR /&gt;&lt;BR /&gt;Then you can use another program like perl to filter the data (Not too easy like unix isn't it)</description>
      <pubDate>Fri, 20 Jan 2006 07:10:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713908#M6927</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-01-20T07:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a command similar to UX "last" to use agains a TS?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713909#M6928</link>
      <description>Ivan,&lt;BR /&gt;thank you.&lt;BR /&gt;I'll check out and get back with feedback.&lt;BR /&gt;slds.&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jan 2006 07:47:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713909#M6928</guid>
      <dc:creator>Edgar Zapata</dc:creator>
      <dc:date>2006-01-20T07:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a command similar to UX "last" to use agains a TS?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713910#M6929</link>
      <description>Try the following link, it gives an example using WSH.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.windowsitpro.com/Article/ArticleID/15113/15113.html" target="_blank"&gt;http://www.windowsitpro.com/Article/ArticleID/15113/15113.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In case the link goes away though....&lt;BR /&gt;&lt;BR /&gt;Save the following text into file userlogin.vbs&lt;BR /&gt;&lt;BR /&gt;' List last logon times&lt;BR /&gt;' 2001-03-27 John Savill, Jakob Hussfelt &lt;A href="http://www.ntfaq.com" target="_blank"&gt;http://www.ntfaq.com&lt;/A&gt;&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;sEnterDCs = "SAVILLTECH,SAVILLNT02"&lt;BR /&gt;sObjects = Split(sEnterDCs, ",")&lt;BR /&gt;Set oDomain = GetObject("WinNT://" &amp;amp; sObjects(0))&lt;BR /&gt;oDomain.Filter = Array("User")&lt;BR /&gt;WScript.Echo "Showing last login times of accounts from: " &amp;amp; oDomain.Name &amp;amp; vbNewLine&lt;BR /&gt;For Each oDomainItem In oDomain&lt;BR /&gt;  sUsrLogin = oDomainItem.LastLogin&lt;BR /&gt;  If UBound(sObjects) &amp;gt;= 1 Then&lt;BR /&gt;    For ii = 1 To UBound(sObjects)&lt;BR /&gt;      Set oUsr = GetObject("WinNT://" &amp;amp; sObjects(ii) &amp;amp; "/" &amp;amp; oDomainItem.Name &amp;amp; ",user")&lt;BR /&gt;      If oUsr.LastLogin &amp;gt; sUsrLogin Then sUsrLogin = oUsr.LastLogin&lt;BR /&gt;    Next&lt;BR /&gt;  End If&lt;BR /&gt;  WScript.Echo "Username: " &amp;amp; Left(oDomainItem.Name &amp;amp; Space(22),22) &amp;amp; "Last login: " &amp;amp; FormatDateTime(sUsrLogin)&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;In line 'set oDomain = GetObject("WinNT://SAVILLTECH")' you should change SAVILLTECH to your domain name.&lt;BR /&gt;&lt;BR /&gt;To run type the following:&lt;BR /&gt;&lt;BR /&gt;C:\&amp;gt; cscript userlogin.vbs&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Fri, 20 Jan 2006 12:07:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713910#M6929</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2006-01-20T12:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a command similar to UX "last" to use agains a TS?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713911#M6930</link>
      <description>Jon,&lt;BR /&gt;thank you much.&lt;BR /&gt;This is what I was looking for.&lt;BR /&gt;I didn't get it to work, though.&lt;BR /&gt;It didn't retrieve any record.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Mon, 23 Jan 2006 09:15:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713911#M6930</guid>
      <dc:creator>Edgar Zapata</dc:creator>
      <dc:date>2006-01-23T09:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a command similar to UX "last" to use agains a TS?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713912#M6931</link>
      <description>Hmmm...  It worked for me:&lt;BR /&gt;&lt;BR /&gt;Showing last login times of accounts from: 11XEDDTC&lt;BR /&gt;&lt;BR /&gt;Username: aceweb                Last login: 12/14/2005 12:35:15 PM&lt;BR /&gt;Username: aconner               Last login: 10/26/2004 4:59:59 PM&lt;BR /&gt;Username: Administrator         Last login: 10/26/2004 4:59:59 PM&lt;BR /&gt;Username: ahonker               Last login: 1/23/2006 9:57:18 AM&lt;BR /&gt;Username: ajmaster              Last login: 1/23/2006 11:32:23 AM&lt;BR /&gt;Username: ajvalent              Last login: 1/23/2006 11:07:04 AM&lt;BR /&gt;Username: akwood                Last login: 1/23/2006 10:26:32 AM&lt;BR /&gt;Username: apinst                Last login: 1/23/2006 11:35:30 AM&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Make sure that on the domain line, that you change it to your DC's:&lt;BR /&gt;&lt;BR /&gt;sEnterDCs = "11XEDDTC,CEATCBDC"&lt;BR /&gt;&lt;BR /&gt;And run the vbs file with credentials that have privledges on the DC's.&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Mon, 23 Jan 2006 13:42:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713912#M6931</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2006-01-23T13:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a command similar to UX "last" to use agains a TS?</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713913#M6932</link>
      <description>It worked fine for me too after making some changes to the original VBS script.&lt;BR /&gt;&lt;BR /&gt;I also ran this command for a particular user; See the output here:&lt;BR /&gt;&lt;BR /&gt;net user ezapata /domain | findstr /i logon&lt;BR /&gt;Logon script&lt;BR /&gt;Last logon              7/28/2008 &lt;BR /&gt;&lt;BR /&gt;Thought it could be of help.&lt;BR /&gt;&lt;BR /&gt;Tnks.&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Jul 2008 15:04:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/is-there-a-command-similar-to-ux-quot-last-quot-to-use-agains-a/m-p/3713913#M6932</guid>
      <dc:creator>Edgar Zapata</dc:creator>
      <dc:date>2008-07-28T15:04:01Z</dc:date>
    </item>
  </channel>
</rss>

