Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2015-02-19
2
Medium Priority
?
148 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 2000 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

Does Powershell have you tied up in knots?

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

A hard and fast method for reducing Active Directory Administrators members.
Here's a look at newsworthy articles and community happenings during the last month.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
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…
Suggested Courses

604 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