Calling Detach Methods in Powershell

Published: May 22, 2012, 6 a.m.

Detaching DBs in Powershell is pretty easy, which is why you should learn how to do it. It takes less typing than the t-sql version. However, there are also methods for discovering which files belong to the DB that was detached and that can be invaluable when you're trying to attach a DB on a big server and you don't know where all the files may be.