Code:
use master
go

CREATE  proc rp_switch_rec_model
(@MODE varchar(20))
as
Declare
  sdb_namecurs cursor for
  select name from master..sysdatabases where name <> 'TEMPDB';
open sdb_namecurs;
  declare @db_name sysname
fetch next from sdb_namecurs into @db_name;
While @@fetch_status = 0
  Begin
    exec('ALTER DATABASE ' + @db_name + ' SET RECOVERY ' + @MODE)
    --print 'ALTER DATABASE ' + @db_name + ' SET RECOVERY ' + @MODE
    fetch next from sdb_namecurs into @db_name
   End
Deallocate sdb_namecurs
GO

-- USAGE
exec rp_switch_rec_model 'SIMPLE'
-- OR
-- exec rp_switch_rec_model 'FULL'
-- OR
-- exec rp_switch_rec_model 'BULK_LOGGED'