I'm having some problems figuring out the syntax for this SHELL command line. I want it to launch osql on the machine and run the SQL command. Here's my latest try, which isn't working:

Code:
 
$SQLPath = 'c:\Program Files\Microsoft SQL Server\80\Tools\Binn\'
$ShellCmd = $SQLPath + Chr(34) + osql.exe -E -Q BACKUP DATABASE [TestRepository] TO [TestRepository_Backup] WITH INIT , NOUNLOAD , NAME = N'TestRepository_Backup', NOSKIP , STATS = 10, NOFORMAT + Chr(34)



Thanks for any help with this!