Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

LDAP LastLogonTimeStamp Conversion

Posted on April 8, 2014October 26, 2015 By David Kittell

In working with LDAP timestamps I found this script very helpful to be able to test with.

Plain Text Date To LastLogonTimeStamp
(Get-Date "2/1/2014").ToFileTime()
LastLogonTimeStamp To Plain Text Date
[datetime]::FromFileTime("128752344000000000")

Reference: http://jai-maharaj.blogspot.com/2012/01/test.html

Originally Posted on April 8, 2014
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Mac OSX Terminal – Clear Oh My ZSH History

Posted on April 9, 2018

If you have fallen in love with Oh My Zsh you likely have at one point realized it currently lacks the “history -c” option to clear your terminal history. This code below will help with that. #!/bin/sh # Clear_OhMyZsh_History.sh # # Script to remove all history or select content #…

Read More

PowerShell Download Latest WordPress Plugin

Posted on September 17, 2015

This script will call out to a defined URL to check the version of a plugin and download the update if needed. To use: # Download only (if web is newer) #powershell -file DownloadLatestWordPressPlugin.ps1 <WordPress URL> <WordPress Plugin Version Installed> <Download Path> powershell -file DownloadLatestWordPressPlugin.ps1 https://wordpress.org/plugins/akismet/ 3.1.3 c:usersdkittelldesktopdownload # Download…

Read More

C# WinForm Write Text Log

Posted on July 31, 2014October 26, 2015

public void LogMessage (string msg) { string sFilePath = Environment.CurrentDirectory + "Log_" + System.AppDomain.CurrentDomain.FriendlyName + ".txt"; System.IO.StreamWriter sw = System.IO.File.AppendText(sFilePath); try { string logLine = System.String.Format( "{0:G}: {1}.", System.DateTime.Now, msg); sw.WriteLine(logLine); } finally { sw.Close(); } } LogMessage("Problem with program"); Originally Posted on July 31, 2014Last Updated on October 26,…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • PowerShell - UNIX SED Equivalent - Change Text In File
  • OpenSSL Generate Salt, Key and IV
  • PowerShell - Backup / Restore IIS Site and Configuration

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - UNIX SED Equivalent - Change Text In File
  • OpenSSL Generate Salt, Key and IV
  • PowerShell - Backup / Restore IIS Site and Configuration
  • PowerShell - Get .NET Framework / Core Version
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes
David Kittell
  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support