Remove-DbaDbFileGroup
Adam Lancaster, github.com/lancasteradam
Remove-DbaDbFileGroup View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Removes empty filegroups from SQL Server databases. Description Removes one or more filegroups from SQL Server databases after validating they contain no data files. This command is useful for cleaning up unused filegroups after moving data to different filegroups or during database reorganization projects. The function performs safety checks to ensure filegroups are empty before removal and provides detailed error messages if removal fails due to dependencies or constraints.
Read more
dbatools