Announcement

Collapse
No announcement yet.

Active Directory user accounts expire date

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Active Directory user accounts expire date

    Is it possible to export a list of user accounts in AD which would give me the date on which their accounts are going to expire other than looking at each account individually?

  • #2
    Re: Active Directory user accounts expire date

    Code:
    dsquery * -limit 0 -Filter "(&(objectCategory=person)objectClass=user)(!accountExpires=9223372036854775807)(!accountExpires=0))" >"c:\ExpiredUsers.txt"
    start c:\ExpiredUsers.txt
    exit
    I use this code to view all expired users in my domain. It will show both users who have expired and those who have been set to expire on a certain day. A guy in the scripting forum actually helped me with this a few weeks ago.

    There may be a way to add the date of expiration, but I'm drawing a blank on that portion.
    MCITP:SA, MCSA 2003, MCP, CCNA, A+, Net+, Security+

    Comment

    Working...
    X