Set-PSCalendarConfiguration
August 14, 2025 ยท View on GitHub
SYNOPSIS
Modify the PSCalendar ANSI configuration.
SYNTAX
Set-PSCalendarConfiguration [[-Title] <String>] [[-DayOfWeek] <String>] [[-Today] <String>]
[[-Highlight] <String>] [-Weekend <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The Get-Calendar and Show-Calendar commands use ANSI escape sequences to colorize the output. Get-PSCalendarConfiguration will display the current settings. You can use Set-PSCalendarConfiguration to modify the settings. You will need to include the escape sequence appropriate for your PowerShell version. You do not need to include the closing escape sequence. If you are looking for suggestions, take a look at Get-PSReadlineOption.
Any configuration changes you make are only for the duration of your PowerShell session. If you want to make them more permanent, you can add Set-PSCalendarConfiguration commands to your PowerShell profile.
EXAMPLES
Example 1
PS C:\> Set-PSCalendarConfiguration -Title "$([char]27)[48;5;57m"
Change the title color scheme on Windows 5.1. This syntax would also work in PowerShell 7.
Example 2
PS C:\> Set-PSCalendarConfiguration -DayOfWeek "`e[48;5;57m"
Change the week day headings color scheme on PowerShell 7.
PARAMETERS
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DayOfWeek
Specify an ANSI sequence for the day of the week heading.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Highlight
Specify the ANSI escape sequence to highlight specified dates.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Title
Specify the ANSI escape sequence for the calendar title which will be the month and year.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Today
Specify the ANSI escape sequence to highlight the current day.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Weekend
Specify an ANSI escape sequence for weekend days.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.