Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-CalendarEvent

Namespace PSWriteHTML

Allows adding new calendar events to calendar

Remarks

Allows adding new calendar events to calendar

Examples

Authored help example

EXAMPLE 1


New-HTMLCalendar {
    New-CalendarEvent -Title 'Active Directory Meeting' -Description 'We will talk about stuff' -StartDate (Get-Date)
    # End date is required for the colors to work...
    New-CalendarEvent -Title 'Lunch' -StartDate (Get-Date).AddDays(2).AddHours(-3) -EndDate (Get-Date).AddDays(3) -Description 'Very long lunch' -TextColor DeepSkyBlue -BackgroundColor yellow -BorderColor Red
}
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-CalendarEvent [-AllDayEvent] [-BackgroundColor <String>] [-BorderColor <String>] [-Color <String>] [-Constraint <String>] [-Description <String>] [-EndDate <Nullable`1>] [-StartDate <DateTime>] [-TargetName <String>] [-TextColor <String>] [-Title <String>] [-Url <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AllDayEvent SwitchParameter optionalposition: namedpipeline: False
Determines if the event is shown in the “all-day” section of the view, if applicable. Determines if time text is displayed in the event. If this value is not specified, it will be inferred by the start and end properties
BackgroundColor String optionalposition: 6pipeline: False
Sets backround color. Only works if EndDate is provided.
BorderColor String optionalposition: 7pipeline: False
Sets border color. Only works if EndDate is provided.
Color String optionalposition: 5pipeline: False
An alias for specifying the backgroundColor and borderColor at the same time.
Constraint String optionalposition: 4pipeline: False
A groupId belonging to other events, "businessHours" or "availableForMeeting"
Description String optionalposition: 1pipeline: False
The text that will appear on an event when hovering over
EndDate Nullable`1 optionalposition: 3pipeline: False
hen your event ends. If your event is explicitly allDay, hour, minutes, seconds and milliseconds will be ignored. If omitted, your events will appear to have the default duration.
StartDate DateTime optionalposition: 2pipeline: False
When your event begins. If your event is explicitly allDay, hour, minutes, seconds and milliseconds will be ignored.
TargetName String optionalposition: 10pipeline: False
Specifies the name of the target frame or window. Default is _self
TextColor String optionalposition: 8pipeline: False
Sets color of Text. Only works if EndDate is provided.
Title String optionalposition: 0pipeline: False
The text that will appear on an event.
Url String optionalposition: 9pipeline: Falsealiases: Uri
A URL that will be visited when this event is clicked by the user.