http://www.rlmueller.net/Integer8Attributes.htm
HTH
"Venkman" <Ven...@discussions.microsoft.com> wrote in message
news:4BFF6DF8-8C83-4367...@microsoft.com...
> Hi all!
>
> I'm having a bit of a problem.
> I want to get all users who have an expired account out of my AD using the
> LDAP moniker like in all the examples.
> In the first step I searched for Users who have an employeeID, and got
> them
> via (employeeID=*). This was quite simple.
>
> When I try to get user Accounts via (accountExpires=0) I get no records
> from
> my query. The result of the query is the same when I try to search with
> (accountExpires<>0) or (!accountExpires=0)
> I am shure that my mistake is very simple, but I was not able to find a
> solution,yet. Can anybody please point me into the correct direction?
> The goal ist to move all expired Accounts to a different OU.
http://www.rlmueller.net/Integer8Discussion.htm
http://www.dbforums.com/archive/index.php/t-964374.html
TDM
query = "<LDAP://OU=USER,OU=ACCOUNT,dc=admin,dc=ms,dc=com>;"
query = query & "(&(objectclass=user)"
query = query & "(accountExpires<>0 ))"
query = query & ";sAMAccountName,accountExpires;onelevel"
I planned to include a reference expiration date in the query to find
accounts that have been expired for 2 weeks - and move them to a different OU.
Is this possible, or di I really have to go throgh all the accounts in my OU
to check for the expiration date?
In my research during script creation, I started here :
What I found important here was the Syntax, this helps understand the data
type
so you can perform additional manipulation if need be. You might also give
this a wack :
(&(objectClass=top)(objectClass=user)(accountExpires=9223372036854775807))
I tried this filter and it returned 52,688 objects in my environment. This
is based on the
information for Account-Expires in the link above.
TDM
"Venkman" <Ven...@discussions.microsoft.com> wrote in message
news:9F20AEA6-F326-4607...@microsoft.com...