I have some questions about your script.
I would like to restore all databases from my SLQ 2008 R2 server to a new server (no user databases on it).
If I use your SP I have to in comment the part concerning "single user" and "multi user". Is it correct ?
I have another problem to solve. Some databases contains FILESTREAM but localised on different disk (means not on the same user databases disk). How can adapt your SP to do that ?
Thanks for your help,