Browse Source

21.06.2019

Added section with error output after executing the script.

Добавлен раздел с выводом ошибок после выполнения скрипта.
pull/3/head
farag2 5 years ago
committed by GitHub
parent
commit
ec8725ccad
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      Win 10.ps1

10
Win 10.ps1

@ -1178,3 +1178,13 @@ Stop-Process -Name StartMenuExperienceHost -Force
# Restart File Explorer
# Перезапустить "File Explorer"
Stop-Process -Name explorer -Force
# Errors output
# Вывод ошибок
Write-Output ""
Write-Host Errors -BackgroundColor Red
($Error | Where-Object -FilterScript {$_ -notmatch "HRESULT" -and $_ -notmatch "TaskManager"} | ForEach-Object {
[PSCustomObject] @{
Line = $_.InvocationInfo.ScriptLineNumber
Error = $_.Exception.Message
}
} | Format-Table -AutoSize -Wrap | Out-String).Trim()

Loading…
Cancel
Save