Skip to content

sharing the knowledge about technologies….

  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

IT Wiz Technology Blog

  • Home
  • About Me
  • Blog

Tag: logs

Getting the Domain Account Lockout from the Security Event Logs using PowerShell

May 15, 2020May 15, 2020 by Samuel Mitchell, posted in Microsoft, windows, Windows server

This article is about search the Windows Security event logs on the DC with the PDC role to list the account lockout information using PowerShell.

  • Open the PowerShell ISE using administrator rights.

pscmd

  • Run the command to get the PDC from the domain and put it in a variable ($pdc in this case)

$pdc = (get-addomain).pdcemulator

  • Run the PS command to get the windows event in the Security logs with ID 4740

Get-WinEvent -ComputerName $pdc -LogName Security | Where-Object ID -EQ ‘4740’

  • Alternative, the Invoke-Command can be used to execute it on the PDC

Invoke-Command -ComputerName $pdc -Credential(Get-Credential) -ScriptBlock{Get-WinEvent -LogName Security | Where-Object id -EQ ‘4740’}

For me information on using the Get-WinEvent cmdlet, refer to the Microsoft documentation here.

Tagged account lockout, domain, Domain controller, events, events log, get-winevent, history, lockout, logs, pdc, Powershell, Security, server, source, windows3 Comments

Search

Archives

  • January 2025
  • August 2024
  • July 2024
  • June 2024
  • October 2023
  • May 2023
  • April 2023
  • February 2023
  • November 2022
  • October 2021
  • July 2021
  • March 2021
  • January 2021
  • September 2020
  • August 2020
  • May 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • July 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • August 2018
  • July 2018
  • June 2018
  • March 2018
  • January 2018
  • August 2017
  • July 2017
  • February 2017

Search

Recent Posts

  • Disable IE Enhanced Security Configuration in Windows Server via script
  • Storage Redundancy in Azure

Navigation

  • Home
  • About Me
  • Contact
  • Blog
Create a website or blog at WordPress.com
  • Subscribe Subscribed
    • IT Wiz Technology Blog
    • Already have a WordPress.com account? Log in now.
    • IT Wiz Technology Blog
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...