< Back

Show-Calendar

Sun Jan 19, 2020 6:18 pm

NAME Show-Calendar



SYNOPSIS

Display a colorized calendar month in the console.





SYNTAX

Show-Calendar [[-Month] <String>] [[-Year] <Int32>] [-HighlightDate <String[]>] [-HighlightColor {Black | DarkBlue

| DarkGreen | DarkCyan | DarkRed | DarkMagenta | DarkYellow | Gray | DarkGray | Blue | Green | Cyan | Red |

Magenta | Yellow | White}] [-DayColor <ConsoleColor>] [-Position <Coordinates>] [-TitleColor <ConsoleColor>]

[-TodayColor <ConsoleColor>] [<CommonParameters>]





DESCRIPTION

This command is a wrapper for Get-Calendar that will display the specified month in a colorized format. The

command uses Write-Host so it does not write anything to the pipeline.





PARAMETERS

-Month <String>

Select a month to display. The command will default to the current year unless otherwise specified.



Required? false

Position? 1

Default value Current month

Accept pipeline input? False

Accept wildcard characters? false



-Year <Int32>

Select a year for the specified month.



Required? false

Position? 2

Default value current year

Accept pipeline input? False

Accept wildcard characters? false



-HighlightDate <String[]>

Specific days (named) to highlight. These dates are surrounded by asterisk characters.



Required? false

Position? named

Default value (Get-Date).date.toString()

Accept pipeline input? False

Accept wildcard characters? false



-HighlightColor <ConsoleColor>

Specify a console color to use for the highlighted dates.



Required? false

Position? named

Default value Green

Accept pipeline input? False

Accept wildcard characters? false



-DayColor <ConsoleColor>

Specify a color for the days of the week heading.



Required? false

Position? named

Default value Cyan

Accept pipeline input? False

Accept wildcard characters? false



-Position <Coordinates>

Enter a System.Management.Automation.Host.Coordinates object to specify a location for the calendar. This may

not work properly in all hosts or PowerShell versions and you might need some trial and error to figure out a

position that works for you.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-TitleColor <ConsoleColor>

Specify a color for the days of the month heading.



Required? false

Position? named

Default value Yellow

Accept pipeline input? False

Accept wildcard characters? false



-TodayColor <ConsoleColor>

Specify a color to mark today.



Required? false

Position? named

Default value Red

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

None







NOTES





This command should have an alias of scal. It writes to the PowerShell hosting application not to the

PowerShell pipeline.



Learn more about PowerShell: http://jdhitsolutions.com/blog/essentia ... resources/



-------------------------- EXAMPLE 1 --------------------------



PS C:\\> Show-Calendar



Display a colorized version of the current month. The current day will also be colorized.

-------------------------- EXAMPLE 2 --------------------------



PS C:\\> Show-Calendar -Month February -Year 2019 -HighlightDate 2/22/19 -HighlightColor red



Display February 2019 and highlight the 22nd in red.

-------------------------- Example 3 --------------------------



PS C:\\> Show-Calendar -Position ([system.management.automation.host.coordinates]::new(75,1))



Display the calendar at a specified X,Y position in the console. This parameter will probably not work in the

PowerShell ISE.



RELATED LINKS

Online Version: http://bit.ly/2KKKgzK

Get-Calendar

Show-GuiCalendar