Powershell Sql Backup Restore

There are different reasons why we need to restore databases I dont want to go into that,
So There are different options with restores than there are with backups.
The easiest way to demonstrate a restore is to simply restore a database from a full backup, setting the option to overwrite the existing database.

Example

    PS SQLSERVER:\> Restore-SqlDatabase -ServerInstance TESTSQL -Database TestDb
    PS SQLSERVER:\> -BackupFile "D:\DBBackup\TestDb_db_20140520113014.bak" -ReplaceDatabase
    

Copy and Try it


This will take some time it depends on the side of backup.
And we are done with the restore!!!!
Here you will find how to take SQL dababase backup.
Powershell Sql Backup