Created
January 18, 2022 07:15
-
-
Save ffcommax/390e5f9f411a0c2f14aa7cd810a74785 to your computer and use it in GitHub Desktop.
user logon logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
how to get user logon logs | |
Get-EventLog -LogName security -InstanceId 4625 -After ((Get-Date).AddDays(-100)) | Select-Object -Property timegenerated, @{n="AccountName";e = {$.replacementstrings[5]}}, @{n="AccountDomain";e = {$.replacementstrings[6]}}, @{n="WorkstationName" ; e = {$_.replacementstrings[19]}} | export-csv c:\users\public\logs.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment