Solved

Set pwdlastset to -1

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
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 …

856 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