I want to create/update accounts for a subsection from around 10000 users

Hello,
I want to create/update accounts for a subsection from around 10000 users. As an example, around 500 accounts. As there are a lot of other applications authenticate against the ad moving the users to another ou won't be an option.
How can I make this selection? Setting an attribute is okay but I've any idea to do this.
I’m waiting for a solution.
Thanks.
