Invoke-SQLCMD
cmdlet does not work when executed through powershell script (.ps1)
Following error is logged:
[error]Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available. [error]Process completed with exit code 0 and had 1 error(s) written to the error stream.
When executed through interactive window it asks for user confirmation.
Is there a work around to pass the default value Yes
when executed through scripts?