
PowerShell Force user password change in an organizational unit
10 November 2019- Log on to your Active Directory domain controller
- Run a PowerShell command prompt
- Enter the following command adapting it according to your environment and your needs
[cc lang=”PowerShell” tab_size=”1″ lines=”40″]
Get-ADUser -Filter * -SearchBase “OU=LAB,DC=CHADER,DC=fr” | Set-ADUser -CannotChangePassword:$false -PasswordNeverExpires:$false -ChangePasswordAtLogon:$true
[/cc]
Views: 182