Cloud Automation Code Deploy On Domain Account Source Lockout Report
This is best practice collateral on for Cloud Automation Code Deploy On Domain Account Source Lockout Report
Reference KB Article: https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security/account-lockout-and-management-tool
Access Operations / Pre-requisite
- Ensure Access to Domain Controller with Domain Admin Privileges
- PowerShell ISE
Operational Procedures
Step 1 - Open PowerShell ISE for Code Deployment
Step 2 - Copy and Paste Content for Code
############################################################################################
# Enterprise Automation Powershell for Remote Trace Locked-Out Object DOMAIN AHS
# Title: az-ps-remote-trace-locked-out-object-ahs-cloud-automation.ps1
# Creation Date: 01082025
# Coded By: Henry Ruelan - Cloud SME | Credit Microsoft Developer Community
# Tech Collateral Note: Execute Automation on Local Node
# Caution: Use Code with Caution. Don't Instantiate Code without prior notification
############################################################################################
Get-WinEvent -FilterHashTable @{LogName='Security'; ID=4740} | Select @('TimeCreated',@{n='Account Name';e={$_.Properties[0].Value}},@{n='Caller Computer Name';e={$_.Properties[1].Value}},@{n='DOMAIN';e={$_.Properties[5].Value}},@{n='PDC Emulator';e={$_.Properties[4].Value}}) | ft
Write-Host “#############################################” -ForegroundColor Green
Write-Host “# This is code automation successfully completed. #” -ForegroundColor Green
Write-Host “#############################################” -ForegroundColor Green
##################
# EOF Automation
##################
Step 3 - Run Automation Code Execution
Step 4 - Export Remote Output
Step 5 - Complete Output Validation
az-ps-remote-trace-locked-out-object-ahs-cloud-automation.ps1
Tech Notes:
Removed ALL VMware Snapshot Post Upgrade and/or as soonest when it's no longer requirement.
Published:
Henry Ruelan - VCAP / VCIX (DCD)
Sr. Principal Cloud Engineer