SQL Server 2005's Management Studio offers lots of new functionality, but you can't always use a GUI. Sometimes you need to run a script from the command line, especially for an upgrade or install ...
Write-Host "Backup in Progress" $QueryStatement = "SELECT * FROM settings where setting_name='backup_path'" $Query = ...