PowerShell Code: Convert Integer8 To Date - Active Directory Security
Maybe your like
Toggle navigation Active Directory & Azure AD/Entra ID Security
Active Directory & Azure AD/Entra ID: Enterprise Security, Methods to Secure Active Directory, Attack Methods & Effective Defenses, PowerShell, Tech Notes, & Geek Trivia…
- Home
- About
- AD Resources
- Attack Defense & Detection
- Mimikatz
- Presentations
- Schema Versions
- Security Resources
- SPNs
- Top Posts
Microsoft EMET 5 Configuration to Mitigate PowerPoint Zero Day
Windows Server 2012 R2 deprecates FRS (File Replication Service)
Oct 28 2014
PowerShell Code: Convert Integer8 to Date- By Sean Metcalf in PowerShell
There are several Active Directory attributes where the value is stored as an Integer8 value. These include:
- accountExpires
- badPasswordTime
- lastlogon
- lastlogontimestamp
- pwdLastSet
Here’s information on what Integer8 is:
Many attributes in Active Directory have a data type (syntax) called Integer8. These 64-bit numbers (8 bytes) often represent time in 100-nanosecond intervals. If the Integer8 attribute is a date, the value represents the number of 100-nanosecond intervals since 12:00 AM January 1, 1601. Any leap seconds are ignored.
In .NET Framework (and PowerShell) these 100-nanosecond intervals are called ticks, equal to one ten-millionth of a second. There are 10,000 ticks per millisecond. In addition, .NET Framework and PowerShell DateTime values represent dates as the number of ticks since 12:00 AM January 1, 0001.
Quick PowerShell code for converting Integer8 into a date/time value:
$Integer8 = “130567517440984934” [datetime]::FromFileTimeUTC($Integer8)
(Visited 12,429 times, 1 visits today)- ActiveDirectory, Integer8, LastLogonTimeStamp, PowerShellCode
Sean Metcalf
I improve security for enterprises around the world working for TrustedSec & I am @PyroTek3 on Twitter. Read the About page (top left) for information about me. :) https://adsecurity.org/?page_id=8
Recent Posts
- Active Directory Security Tip #16: Mitigating Kerberoast Attacks
- Active Directory Security Tip #15: Active Directory Domain Root Permissions
- Active Directory Security Tip #14: Group Managed Service Accounts (GMSAs)
- Improve Entra ID Security More Quickly
- BSides NoVa 2025 Presentation Slides Posted
Active Directory & Entra ID Security Services
Have concerns about your Active Directory environment and/or Entra ID tenant? We help enterprises improve their security posture.Find out how...
Popular Posts
- AD Reading: Windows Server 2019 Active Directory Features
- PowerShell Encoding & Decoding (Base64)
- Attack Methods for Gaining Domain Admin Rights in…
- Kerberos & KRBTGT: Active Directory’s…
- Finding Passwords in SYSVOL & Exploiting Group…
- Securing Domain Controllers to Improve Active…
- Securing Windows Workstations: Developing a Secure Baseline
- Detecting Kerberoasting Activity
- Mimikatz DCSync Usage, Exploitation, and Detection
- Scanning for Active Directory Privileges &…
Categories
- ActiveDirectorySecurity
- Apple Security
- Cloud Security
- Continuing Education
- Entertainment
- Entra ID Security
- Exploit
- Hacking
- Hardware Security
- Hypervisor Security
- Interview
- Linux/Unix Security
- Malware
- Microsoft Security
- Mitigation
- Network/System Security
- PowerShell
- RealWorld
- Security
- Security Conference Presentation/Video
- Security Recommendation
- Technical Article
- Technical Reading
- Technical Reference
- TheCloud
- Vulnerability
Tags
ActiveDirectory Active Directory ActiveDirectorySecurity Active Directory Security ActiveDirectorySecurityTip ADReading ADSecurity AD Security Azure DCSync DomainController GoldenTicket HyperV Invoke-Mimikatz KB3011780 KDC Kerberoast Kerberos KerberosHacking KRBTGT LAPS LSASS MCM MicrosoftEMET MicrosoftWindows mimikatz MS14068 PassTheHash PowerShell PowerShellCode PowerShellHacking PowerShellv5 PowerSploit PowerView Presentation Security SilverTicket SneakyADPersistence SPN TGS TGT Windows10 WindowsServer2008R2 WindowsServer2012 WindowsServer2012R2 Search for:Recent Posts
- Active Directory Security Tip #16: Mitigating Kerberoast Attacks
- Active Directory Security Tip #15: Active Directory Domain Root Permissions
- Active Directory Security Tip #14: Group Managed Service Accounts (GMSAs)
- Improve Entra ID Security More Quickly
- BSides NoVa 2025 Presentation Slides Posted
Recent Comments
- Gxxxx on Active Directory Security Tip #1: Active Directory Admins
- Sean Metcalf on Securing Domain Controllers to Improve Active Directory Security
- Oliver on Securing Domain Controllers to Improve Active Directory Security
- Oddvar Moe on Securing Windows Workstations: Developing a Secure Baseline
- Kurt Falde on Securing Windows Workstations: Developing a Secure Baseline
Archives
- January 2026
- December 2025
- November 2025
- October 2025
- September 2025
- August 2025
- December 2020
- May 2020
- January 2020
- August 2019
- March 2019
- February 2019
- October 2018
- August 2018
- May 2018
- January 2018
- November 2017
- August 2017
- June 2017
- May 2017
- February 2017
- January 2017
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- July 2013
- November 2012
- March 2012
- February 2012
Categories
- ActiveDirectorySecurity
- Apple Security
- Cloud Security
- Continuing Education
- Entertainment
- Entra ID Security
- Exploit
- Hacking
- Hardware Security
- Hypervisor Security
- Interview
- Linux/Unix Security
- Malware
- Microsoft Security
- Mitigation
- Network/System Security
- PowerShell
- RealWorld
- Security
- Security Conference Presentation/Video
- Security Recommendation
- Technical Article
- Technical Reading
- Technical Reference
- TheCloud
- Vulnerability
Meta
- Log in
- Entries feed
- Comments feed
- WordPress.org
Copyright
Content Disclaimer: This blog and its contents are provided "AS IS" with no warranties, and they confer no rights. Script samples are provided for informational purposes only and no guarantee is provided as to functionality or suitability. The views shared on this blog reflect those of the authors and do not represent the views of any companies mentioned. Content Ownership: All content posted here is intellectual work and under the current law, the poster owns the copyright of the article. Terms of Use Copyright © 2011 - 2025.Content Disclaimer: This blog and its contents are provided "AS IS" with no warranties, and they confer no rights. Script samples are provided for informational purposes only and no guarantee is provided as to functionality or suitability. The views shared on this blog reflect those of the authors and do not represent the views of any companies mentioned.
Made with by Graphene Themes.
Tag » Active Directory Pwdlastset Convert To Date Powershell
-
Get-AdUser PwdLastSet - Get Aduser Last Password Change
-
Efficiently Converting Pwdlastset To Datetime In A Single Line.
-
Converting Pwdlastset To Datetime Datatype Not Working From Hash ...
-
Powershell Output Of Ad-user PwdLastSet And LastLoginTimeStamp
-
TIP: Active Directory Module Date Properties - Tech Wizard
-
Powershell: How Do I Query PwdLastSet And Have It Make Sense?
-
Convert Int64 TimeStamp To DateTime In Powershell
-
LDAP, Active Directory & Filetime Timestamp Converter
-
Active Directory Powershell: Quick Tip LastLogonTimeStamp And ...
-
Powershell Script - Users Pwdlastset - Spiceworks Community
-
Finding Users Who Have Not Changed Their Password Recently
-
How To Find Last Password Change Date With Or Without PowerShell
-
How To Convert Active Directory TimeStamp Property To DateTime
-
Integer8 Attributes