Feb. 10, 2023, 11:16 a.m. | R. Eric Kiser

System Weakness - Medium systemweakness.com

R. Eric Kiser

Whether conducting a penetration test or serving as an administrator, it is often necessary to automate repetitive tasks through scripting. In this article, I will show you how to write a script that utilizes domain admin credentials to set the password expiration policy for a list of users in Active Directory (AD). This script specifically targets the password expiration policy.

Prompt for the server name that has AD running:

$server_name = Read-Host "Enter the server name that …

active directory article credentials directory domain domain admin expiration hacking list name password password expiration penetration penetration test penetration testing policy powershell programming script scripting server test

Network Security Administrator

@ Peraton | United States

IT Security Engineer 2

@ Oracle | BENGALURU, KARNATAKA, India

Sr Cybersecurity Forensics Specialist

@ Health Care Service Corporation | Chicago (200 E. Randolph Street)

Security Engineer

@ Apple | Hyderabad, Telangana, India

Cyber GRC & Awareness Lead

@ Origin Energy | Adelaide, SA, AU, 5000

Senior Security Analyst

@ Prenuvo | Vancouver, British Columbia, Canada