Solved

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

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

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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