dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Restores the database from the snapshot, discarding every modification made to the database
NB: Restoring to a snapshot will result in every other snapshot of the same database to be dropped. It also fixes some long-standing bugs in SQL Server when restoring from snapshots.




To Restore the HR and Accounting databases using the latest snapshot available.

Restore-DbaDbSnapshot -SqlServer sqlserver2014a -Databases HR, Accounting

To restore the databases from snapshots named HR_snap_20161201 and Accounting_snap_20161101.

Restore-DbaDbSnapshot -SqlServer sqlserver2014a -Snapshots HR_snap_20161201, Accounting_snap_20161101


This command was created by Simone Bizzotto. You can find Simone on LinkedIn.


From PowerShell, execute Get-Help Restore-DbaDbSnapshot -Detailed for more information on this function.

Source Code

Want to see the source code? View Restore-DbaDbSnapshot.ps1 on GitHub

Related commands