C'est assez souvent que l'administrateur d'Active Directory doit trouver des comptes soit désactivés soit verrouillés et les activer ou déverrouiller.
Voici comment nous pouvons effectuer ces opérations avec Powershell.
***
Dresser la liste des comptes désactivés :
Get-ADUser -filter {Enabled -eq "false"} | fl name
Activer un compte :
Set-ADUser Jean.Lebrun -Enable $true
Trouver les comptes (utilisateur) verrouillés :
Search-ADAccount -LockedOut -UsersOnly | FL name,LockedOut
name : Jean LebrunLockedOut : True
Déverrouiller un compte :
Unlock-ADAccount "CN=Jean Lebrun,OU=Lyon,DC=mynet,DC=lan"
Déverrouiller tous les comptes verrouillés :
Search-ADAccount -LockedOut -UsersOnly | Unlock-ADAccount
Voir la stratégie du domaine pour les mots de passe :
Get-ADObject "dc=mynet,dc=lan" -prop * | FL minPwdLength,pwdHistoryLength,pwdProperties,lockoutThreshold
minPwdLength : 7pwdHistoryLength : 24pwdProperties : 1lockoutThreshold : 10
Related articles :
PKI (Public Key Infrastructure), special post: training course with Mark CooperI'm going to interrupt the sequence of my blog posts on PKI to share an excellent experience I had l… Read More...
Exchange 2015 (SP1) - Migration - Part 3 - More preparation... There are a number of other steps to take before we install Exchange 2015:Enable Outlook Anywhere on… Read More...
WINS - special blog postHaving blogged most recently about Office 365, Windows 2012 and IPv6, I did not foresee th… Read More...
Windows Server 2012 - Active Directory - NTDSUTIL, part 2In this second post about NTDSUTIL, I'm going to examine three other tasks we can perform with this … Read More...
Windows Server 2012 - Active Directory - Backup and Restore, Part 1: System StateIntroductionFor my next serie of blog posts, I want to examine aspects of backing up and restor… Read More...
Office 365 - Hybrid Migration - Conclusion, links and resourcesIn my preceding blog posts, I was able to migrate mailboxes from Exchange 2010 (SP3) to Exchange Onl… Read More...
PKI (Public Key Infrastructure) with ADCS, Part 3: configuration of the root CAIn this blog post, I will configure my root CA.As mentioned in previous blog posts, the root CA is o… Read More...
PKI (Public Key Infrastructure) with ADCS, Part 9: web enrollment (web server certificate for the CA)In my previous blog post, I explained that before clients can request a certificate from the issuing… Read More...
Exchange 2010 - CAS ArrayOK. First blog. Subject: the CAS Array or "Client Access Server Array".Questions about the CAS Array… Read More...
Exchange 2015 (SP1) - Migration - Part 1 - Documenting the existing environmentINTRODUCTIONIn this blog post, first of a series about migrating to Exchange 2015 (from 2007 in this… Read More...
Like this article? Please share :