Solved

Set pwdlastset to -1

Posted on 2013-11-21
1
741 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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