Bulk activate a theme on multisite

Fuxia was using update_option in her answer and it may work, but I wouldn’t recommend that – it isn’t the polite way of setting a theme.

So how I would approach that problem?

First of all, you want to perform this action only once and for all sites. So there is no point in using any hooks. Just run the code once and then delete it.

And that code should loop through all sites and set their theme:

function switch_all_multisite_themes() {
    foreach ( get_sites() as $site ) {
        switch_to_blog( $site->blog_id );

        switch_theme( 'theme' ); // for example 'twentyten'

        restore_current_blog();
    }
}
switch_all_multisite_themes();  // run this function only once