I've used this time ago (you have to edit based on your need)
$list = gc c:\UserList.txt
$db = [string]::Empty
foreach ($user in $list)
{
switch -regex ($user) # I used a regex to find starting char of user and assign to $db variable the name of the mailboxdatabase
{
'^[a-c]' { $db = "A-C" }
'^[d-l]' { $db = "D-L" }
'^[m-p]' { $db = "M-P" }
default { $db = "Q-Z" }
}
New-MoveRequest -Identity $user -TargetDatabase $db # I used a move but you can do whatever you want
}