forked from BornToBeRoot/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Get-ConsoleColor.ps1
67 lines (54 loc) · 1.44 KB
/
Get-ConsoleColor.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
###############################################################################################################
# Language : PowerShell 4.0
# Filename : Get-ConsoleColor.ps1
# Autor : BornToBeRoot (https://github.com/BornToBeRoot)
# Description : Get all available console colors
# Repository : https://github.com/BornToBeRoot/PowerShell
###############################################################################################################
<#
.SYNOPSIS
Get all available console colors
.DESCRIPTION
Get all available console colors. A preview how they look (foreground and background) can be displayed with the parameter "-Preview".
.EXAMPLE
Get-ConsoleColor
ConsoleColor
------------
Black
DarkBlue
DarkGreen
DarkCyan
DarkRed
DarkMagenta
DarkYellow
Gray
DarkGray
Blue
Green
Cyan
Red
Magenta
Yellow
White
.LINK
https://github.com/BornToBeRoot/PowerShell/blob/master/Documentation/Function/Get-ConsoleColor.README.md
#>
function Get-ConsoleColor
{
[CmdletBinding()]
param(
)
Begin{
}
Process{
$Colors = [Enum]::GetValues([ConsoleColor])
foreach($Color in $Colors)
{
[pscustomobject] @{
ConsoleColor = $Color
}
}
}
End{
}
}