I have a string in powershell, which contains a native sqlcmd command. The command itself can be executed successfully in cmd.exe. I have difficulty in executing them in pow
To call a Win32 executable you want to use the call operator & like this:
&
& sqlcmd -S "(local)\instance1" -U a -P a -i "c:\temp\sql.sql"