Solved

Set pwdlastset to -1

Posted on 2013-11-21
1
733 Views
Last Modified: 2013-12-16
I need to change a group of users so that all their passwords show they changed it -1 day before this way there passwords will not need to be reset for another 90 days and it does not require them to change their PW right now but instead keeps the one they have in place for 90 more days.  If theres an easier way to do this please let me know other wise my thoughts were change the pwdlastset to -1

TY
0
Comment
Question by:Twhite0909
1 Comment
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39667237
If you have a list of users in a text file and Windows 2008 R2 Domain controllers, then try..
Import-Module Activedirectory
Get-Content C:\User.txt | % {
 Set-ADUser $_ -Replace @{pwdLastSet="-1"}
}

Open in new window

Sample C:\User.txt file format..
UserA
UserB
UserC

Open in new window

0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
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 to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

708 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