• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 889
  • Last Modified:

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

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
mjm21
Asked:
mjm21
  • 2
1 Solution
 
SubsunCommented:
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
 
mjm21Author Commented:
Excellent!  Going to test in a few....
0
 
mjm21Author Commented:
Perfect!  Thanks!
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now