Solved

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

Posted on 2015-02-19
2
100 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
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now