While it is true that you can run any old cmd command in PS, sometimes you may run into issues due to the syntax of Powershell.

There's a good article about this:
http://blogs.technet.com/b/josebda/archive/2012/03/03/using-windows-powershell-to-run-old-command-line-tools-and-their-weirdest-parameters.aspx
I personally prefer using here-string with Invoke-expression:

$command = @'
cmd.exe /C c:\windows\system32\ntbackup.exe backup "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\chameme.bks" /n "1file.bkf1 created 06/09/2013 at 09:36" /d "Set created 06/09/2013 at 09:36" /v:no /r:no /rs:no /hc:off /m normal /j chameme /l:s /f "\\fs1\Exchange Backups$\1file.bkf"
'@
Invoke-expression -Command:$command

This is especially helpful when you run into some heavy quoting issues.  I can see your $ sign within double quotes may prompt PS to try interpreting it as a variable which can cause problems.

If you've unfortunately fallen into what some call a "quoting hell", there is one way to get yourself out from it:

$batchFileContent = @'
@echo off
c:\windows\system32\ntbackup.exe backup "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\chameme.bks" /n "1file.bkf1 created 06/09/2013 at 09:36" /d "Set created 06/09/2013 at 09:36" /v:no /r:no /rs:no /hc:off /m normal /j chameme /l:s /f "\\fs1\Exchange Backups$\1file.bkf"
'@
$batchFileContent | Out-File -LiteralPath:"$env:TEMP\backup.cmd" -Force
Invoke-expression -Command:"$env:TEMP\backup.cmd"
Remove-Item -LiteralPath:"$env:TEMP\backup.cmd" -Force

one shortcoming of this method is it's not as easy to capture the result or errors if needed.  However if all you need is just run the command then this will work for you.

Just from my experience.

EDIT: If you're running PS3 then just add --% anywhere in the line and PS3 will not try to parse the line in PS syntax.

Monday, September 09, 2013 5:16 AM

+ Recent posts