Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Powershell / Quest Cmdlets script for User Account Expires the end of?

Posted on 2013-11-27
3
Medium Priority
?
865 Views
Last Modified: 2013-12-02
Powershell / Quest Cmdlets script for User Account Expires.  

Takes a list of usernames from a .CVS or .txt filer and then "clicks" the Account Expires End of" option in ADUC for all of them....
0
Comment
Question by:mjm21
[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
3 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 39682060
Try this..
Import-Module Activedirectory
GC c:\input.txt | % {
Set-ADAccountExpiration $_ -DateTime "12/25/2013"
}

Open in new window

c:\input.txt file format..
UserA
UserB
UserC

Open in new window

0
 

Author Comment

by:mjm21
ID: 39689995
Excellent!  Going to test in a few....
0
 

Author Comment

by:mjm21
ID: 39690152
Perfect!  Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
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 …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

721 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