Что касается этого ...
'пакетный запуск в фоновом режиме'
есть ли способ заставить пакетный файл запускаться на переднем плане o визуально?
... PowerShell при вызове и внешнем файле, ie., .Exe или .bat, - это определенные способы их вызова и решения вашего варианта использования. Это хорошо задокументировано во всем Интернете. Как уже отмечалось, эти команды не являются PowerShell, они просто являются пакетными компонентами в сценарии PowerShell, или я собираюсь предположить, что они находятся в вашем пакетном файле.
Все это, как говорится, процесс вызова внешнего файл определен.
Нет необходимости делать это как командный файл. Просто вызовите это непосредственно в скрипте PowerShell.
См. Также следующую информацию ---
PowerShell: Запуск исполняемых файлов
# Example(s):
& 'C:\Program Files\Windows Media Player\wmplayer.exe' "c:\videos\my home video.avi" /fullscreen
<#
Things can get tricky when an external command has a lot of parameters or there
are spaces in the arguments or paths!
With spaces, you have to nest Quotation marks and the result it is not always
clear!
In this case, it is better to separate everything like so:
#>
$CMD = 'SuperApp.exe'
$arg1 = 'filename1'
$arg2 = '-someswitch'
$arg3 = 'C:\documents and settings\user\desktop\some other file.txt'
$arg4 = '-yetanotherswitch'
& $CMD $arg1 $arg2 $arg3 $arg4
# or something like this:
$AllArgs = @('filename1', '-someswitch', 'C:\documents and settings\user\desktop\some other file.txt', '-yetanotherswitch')
& 'SuperApp.exe' $AllArgs
<#
** This method should no longer be used with V3
Why: Bypasses PowerShell and runs the command from a cmd shell. Often times used
with a DIR which runs faster in the cmd shell than in PowerShell (NOTE: This was
an issue with PowerShell v2 and its use of .Net 2.0, this is not an issue with
V3).
Details: Opens a CMD prompt from within PowerShell and then executes
the command and returns the text of that command. The /c tells CMD that
it should terminate after the command has completed. There is little to
no reason to use this with V3.
#>
# Example:
<#
runs DIR from a cmd shell, DIR in PowerShell is an alias to GCI. This will
return the directory listing as a string but returns much faster than a GCI
#>
cmd /c dir c:\windows
См. Также
Выполнение внешних команд в PowerShell выполнено правильно
PowerShell и внешние команды выполнены правильно 'https://mnaoumov.wordpress.com/2015/01/11/execution-of-external-commands-in-powershell-done-right '
Лучшие 5 советов по запуску внешних команд в Powershell
PowerShell: Запуск исполняемых файлов
Решение проблем с внешними командными строками в PowerShell
Использование Windows PowerShell для запуска старых инструментов командной строки (и их самых странных параметров)
Особенности квотирования https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules
Итак, этот ...
start /wait /d"C:\Turing\App\" TuringExpo.exe "456555384" "Test"
start /wait /d"C:\Program Files\Microsoft Office\root\Office16\" winword.exe
... может стать чем-то, связывающим это, просто используя PowerShell, нет задействован пакетный файл:
Start-Process -FilePath 'C:\Turing\App\TuringExpo.exe' -ArgumentList '456555384', 'Test' -Wait
Start-Process -FilePath winword -Wait