Solved

How to set all active directory user accounts to user cannot change password?

Posted on 2015-02-19
2
122 Views
Last Modified: 2015-03-06
I just applied the dsquery user command to apply the "Password never expires" for all my user accounts on my DC. I want to be able to do the same for all the accounts for the "User cannot change password" attribute. Can someone give me the command for that please.
0
Comment
Question by:StosSpiro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:Itxx
ID: 40618703
Does it have to be with command line?
Otherwise, in Active Directory you can make a query.

Query root: *.local
Define query: you could use: Name - Is Not - zzzzzz.
That would give all the users.

Select them all, right click, properties and change the desired settings.
If you change the password settings on the Account tab don't forget to check both checkboxes.
0
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
ID: 40619084
You can do this via powershell very easily. Use the below command..
Import-module activedirectory
Get-ADUser -filter * | Set-ADUser -CannotChangePassword $true

Open in new window


Will.
0

Featured Post

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question