If I have 2 domains on a system, it there a way to close or make inactive all accounts on one of the domains?

A command line type of thing?