Q:

How to move mailboxes from one database to another via cmdlet

I have 10 Exchange mailboxdatabases, one of them is having log issues where DPM or WSB are not removing the logs after backups so I need to move all the mailboxes off this Database.   How do I select all the mailboxes in this database and move them to the new one? 

A:

If you are sure you want to move all mailboxes, then you can just do the following:
Get-Mailbox –Database "SOURCE_DATABASE" | New-MoveRequest –TargetDatabase "TARGET_DATABASE"

That would force all mailboxes that are in that source database to start a MoveRequest to the new database.   You could then use the EMC to look at the move requests and see how the individual moves are progressing.