forked from PHOENIXCONTACT/MORYX-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOutput.ps1
36 lines (29 loc) · 1.24 KB
/
Output.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
################################
# Functions for Console Output #
################################
function Write-Step([string]$step) {
Write-Host "########################################################################################################" -foreground Magenta;
Write-Host "#### $step" -foreground Magenta;
Write-Host "########################################################################################################" -foreground Magenta
}
function Write-Variable ([string]$variableName, [string]$variableValue) {
Write-Host ($variableName + " = " + $variableValue)
}
function Invoke-ExitCodeCheck([string]$exitCode) {
if ([int]::Parse($exitCode) -gt 0) {
Write-Host "This is the end, you know (ExitCode: $exitCode) - Lady, the plans we had went all wrong - We ain't nothing but fight and shout and tears." -ForegroundColor Red
exit $exitCode;
}
}
function Write-Host-Info([string]$message) {
Write-Host $message
}
function Write-Host-Success([string]$message) {
Write-Host $message -ForegroundColor Green
}
function Write-Host-Warning([string]$message) {
Write-Host $message -ForegroundColor Yellow
}
function Write-Host-Error([string]$message) {
Write-Host $message -ForegroundColor Red
}