I have a batch file to execute the PowerShell script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -command .\MyPowerShell.ps1
echo message1
echo message2
The batch can run the PowerShell with no problem but the CMD prompt displays the output of the PowerShell script. Is that possible to hide the output of the PowerShell script in the CMD prompt? I still need to deliver some messages in the CMD prompt so terminate CMD is not an option. Any help would be appreciated!
Out-Null.