PowerShell script to restore MS SQL database

Here’s a small function that will restore MS SQL database. I couldn’t find a nice script on the net, so had to rewrite some C# code to PowerShell, enjoy: clear trap{ Write-Host $_.Exception.InnerException.InnerException.Message -ForegroundColor Red }... Read the full text.