Powershell command to recover deleted database
1 answer
As per your comment, there are no PowerShell specific commands. You will need to use New-PSDrive to map the drive to the server, use Copy-Item to copy the database to the server, and then use one of the SQL 2008 commands (2 in total) to execute the required RESTORE DATABASE. SQL2008 did not ship anything more specific, and the SQL Server product itself cannot perform a restore from a remote path (well, maybe UNC, but I assume you are on the client), it would be easier to copy the backup to the server).
+2
source to share