j(23,9): error : SmoException: System.Data.SqlClient.SqlError: The operating system returned the error
'32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::ValidateTargetForCreation'

So it looks like SQL has the files locked. You'll need to restore to a different file location (SQL will delete the files in use automatically). If you like you can then script a move of the datafiles back to where you need them.