-ErrorAction Stop вы увидели ?catch {
Write-Host 'Я, блин, там где надо !'
} This is executed by Windows Update telemetry to check for updated UEFI certificates related to the upcoming expiration in June 2026.
set ps=%SysPath%\WindowsPowerShell\v1.0\powershell.exe
set psc=%ps% -nop -cfor /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':getappnames\:.*';iex ($f[1])"
два однострочника на powershell