< Back

New-BTHeader

Sun Jan 12, 2020 7:33 pm

NAME New-BTHeader



SYNOPSIS

Creates a new toast notification header.





SYNTAX

New-BTHeader [-Id] <String> [-Title] <String> [[-Arguments] <String>] [[-ActivationType] {Foreground | Background

| Protocol}] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

The New-BTHeader function creates a new toast notification header for a Toast Notification.



These headers are diaplyed at the top of a toast and are also used to categorize toasts in the Action Center.





PARAMETERS

-Id <String>

Unique string that identifies a header. If a new Id is provided, the system will treat the header as a new

header even if it has the same display text as a previous header.



It is possible to update a header's display text by re-using the Id but changing the title.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Title <String>

The header string that is displayed to the user.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Arguments <String>

Specifies an app defined string.



For the purposes of BurntToast notifications this is generally the path to a file or URI and paired with the

Protocol ActivationType.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ActivationType

Defines tne ActivationType that is trigger when the button is pressed.



Defaults to Protocol which will open the file or URI specified in with the Arguments parameter in the relevant

system default application.



Required? false

Position? 4

Default value Protocol

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

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

You cannot pipe input to this function.





OUTPUTS

Microsoft.Toolkit.Uwp.Notifications.ToastHeader





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



PS C:\\>New-BTHeader -Id 'primary header' -Title 'First Category'



This command creates a Toast Header object, which will be displayed with the text "First Category."









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



PS C:\\>New-BTHeader -Id '001' -Title 'Stack Overflow Questions' -Arguments 'http://stackoverflow.com/'



This command creates a Toast Header object, which will be displayed with the text "First Category."



Clicking the header will take the user to the Stack Overflow website.











RELATED LINKS

https://github.com/Windos/BurntToast/bl ... THeader.md