Powershell Module to enhance host display see Help Page
- Write-Line
- Write-ChoiceMenu
- Add-ChoiceItem
- Read-Line
A colored and/or bordered write-host
- Display text in the host with a colored zone
- Display text in the host with colored border
Write-Line "The text between [Bracket] is [Colored]"
Write-Line "This text will be displayed with border" -Border
Write-Line "The text between [Bracket] is [Colored] but bracket are removed" -HideChar
Write-Line "The text between #sharp% and #percent% will be colored #sharp% and #percent% will not be displayed" -HideChar -OpenChar "#" -CloseChar "%"
Create a Choice Item to use with Write-ChoiceMenu
- Create a Menu item that return a string
$ChoiceMenu = Add-ChoiceItem -MenuItem "Get the process list" -MenuAction "Get-Process"
$ChoiceMenu = Add-ChoiceItem -Menu $ChoiceMenu -MenuItem "Get the time" -MenuAction "Get-Date -Format HH:mm:ss"
$ChoiceMenu = Add-ChoiceItem -Menu $ChoiceMenu -MenuItem "Get the date" -MenuAction "Get-Date -Format dd.MM.yyyy"
A Choice Menu creator
- Create a Menu into host where user have to select between different choice defined by Add-ChoiceItem
- Return
$null
if user choose to exit
- Return
A predefined read-host
- Return
$Null
if Quit (except if noquit) (not case sensitive and also accept Q and E or Exit) - Return
$True
if Yes (not case sensitive and also accept Y) - Return
$False
if No (not case sensitive and also accept N)