powershellmagazine.com
#PSTip Get Active Database Connections of a SQL Database
Note: This tip requires PowerShell 2.0 or above. As a part of SQL SMO automation, when we want to detach or delete databases, we might want to first drop all active database connections. But how do…