Wednesday, 9 September 2015

My collection of useful Powershell commands

The below is (or rather will be) a compilation of powershell commands that have come in handy for myself during day to day operations.

Ensure all users in a specific OU have thier accounts set to "Password Never Expires":
Get-AdUser -Filter * -SearchBase "OU=myou,DC=my,DC=domain" -Server dc01 | Set-ADUser -PasswordNeverExpires $true -Credential administrator

0 comments:

Post a comment