How to mass change theme for all Multisite network sites?

I wouldn’t recommend to use update_option for this task. Why? Because themes/plugins may use switch_theme action and it won’t get run in such case. And this action is pretty important – it will allow you to save your widgets for example…

Another problem with Fuxias answer is that she uses template_directory hook. But there is no point to run it every time. If you set the theme, it is set, so you have to do it only once.

Here’s the code that will loop through all subsites and set the theme to given one. Put it on your site, run once and then delete it (or comment it):

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

        switch_theme( 'twentyeleven' );

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