I have a PSHost object executing a Powershell script myscript.ps1 and that .ps1 script is executing sqlcmd.exe to get what it needs done. Is there a way to keep it from popping up empty sqlcmd dos prompts (as it seems to do)?
A:
For example: http://blog.sapien.com/index.php/2006/12/26/more-fun-with-scheduled-powershell
You're going to have to wrap sqlcmd.exe in something else as PowerShell isn't able to AFAIK.
From a scripting perspective, this does change for powershell.exe in v2, but I'm not sure that is available in SDK for custom hosts.
Marco Shaw
2009-03-13 16:53:57