Some examples of perhaps useful logic. I would use them to have a display for troublesome things that are far off from my frequent working places. (Say: Having the overview of turret status while working on a Phase Fabric setup).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/pwsh | |
# DEFINITION: Get all error-outputs in English: | |
[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US' | |
# DEFINITION: Set default ErrorAction to Stop: | |
# CREDIT: https://stackoverflow.com/a/21260623/8013879 | |
$PSDefaultParameterValues = @{} | |
$PSDefaultParameterValues += @{'*:ErrorAction' = 'Stop'} | |
$ErrorActionPreference = 'Stop' |
This gist moved into its own repository: