Powershell script gets stuck, doesn't exit when called from batch file

前端 未结 10 629
不知归路
不知归路 2020-12-24 11:08

I have a PowerShell script that connects to a web site, and parses its returned data (It\'s about importing a previously uploaded SQL file into the web site\'s data base). T

10条回答
  •  春和景丽
    2020-12-24 11:41

    you can simply add an 'exit' command to the end of the .ps1 script (or any variant of process termination that you wish). Powershell will continue to run at the end of the script as it has not been told to terminate (when run in PS or ISE it will auto-terminate at the end of the script but not when run through the DOS shell).

提交回复
热议问题