Script to list the recovery models for every database

Below is a script that can be used to retrieve the recovery model for each database:

Please ensure you test any script taken from my website on a test/development machine, before running on a production server

CREATE TABLE #DBs (DBName VARCHAR(100), RecoveryModel SQL_VARIANT)
INSERT INTO #DBs 
EXEC sp_msforeachdb 'SELECT ''?'', DATABASEPROPERTYEX(''?'', N''RECOVERY'')'
SELECT * FROM #DBs
DROP TABLE #DBs