< Back
Update-BTNotification
Post
NAME Update-BTNotification
SYNOPSIS
Updates a toast notification for display.
SYNTAX
Update-BTNotification [[-SequenceNumber] <UInt64>] [[-UniqueIdentifier] <String>] [[-AppId] <String>]
[[-DataBinding] <Hashtable>] [<CommonParameters>]
DESCRIPTION
The Update-BTNotification function updates a toast notification in the operating systems' notification manager.
PARAMETERS
-SequenceNumber <UInt64>
When updating toasts (not curently working) rapidly, the sequence number helps to ensure that toasts recieved
out of order will not be displayed in a manner that may confuse.
A higher sequence number indicates a newer toast.
Required? false
Position? 1
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-UniqueIdentifier <String>
A string that uniquely identifies a toast notification. Submitting a new toast with the same identifier as a
previous toast will replace the previous toast.
This is useful when updating the progress of a process, using a progress bar, or otherwise correcting/updating
the information on a toast.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AppId <String>
Specifies the AppId of the 'application' or process that spawned the toast notification.
Required? false
Position? 3
Default value $Script:Config.AppId
Accept pipeline input? false
Accept wildcard characters? false
-DataBinding <Hashtable>
A hashtable that binds strings to keys in a toast notification. In order to update a toast, the original toast
needs to include a databinding hashtable.
Required? false
Position? 4
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
LOTS...
OUTPUTS
NONE
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$FirstDataBinding = @{
FirstLine = 'Example Toast Heading'
SecondLine = 'This toast is still the original'
}
New-BurntToastNotification -Text 'FirstLine', 'SecondLine' -UniqueIdentifier 'ExampleToast' -DataBinding
$FirstDataBinding
$SecondDataBinding = @{
SecondLine = 'This toast has been updated!'
}
Update-BTNotification -UniqueIdentifier 'ExampleToast' -DataBinding $SecondDataBinding
RELATED LINKS
https://github.com/Windos/BurntToast/bl ... ication.md
SYNOPSIS
Updates a toast notification for display.
SYNTAX
Update-BTNotification [[-SequenceNumber] <UInt64>] [[-UniqueIdentifier] <String>] [[-AppId] <String>]
[[-DataBinding] <Hashtable>] [<CommonParameters>]
DESCRIPTION
The Update-BTNotification function updates a toast notification in the operating systems' notification manager.
PARAMETERS
-SequenceNumber <UInt64>
When updating toasts (not curently working) rapidly, the sequence number helps to ensure that toasts recieved
out of order will not be displayed in a manner that may confuse.
A higher sequence number indicates a newer toast.
Required? false
Position? 1
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-UniqueIdentifier <String>
A string that uniquely identifies a toast notification. Submitting a new toast with the same identifier as a
previous toast will replace the previous toast.
This is useful when updating the progress of a process, using a progress bar, or otherwise correcting/updating
the information on a toast.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AppId <String>
Specifies the AppId of the 'application' or process that spawned the toast notification.
Required? false
Position? 3
Default value $Script:Config.AppId
Accept pipeline input? false
Accept wildcard characters? false
-DataBinding <Hashtable>
A hashtable that binds strings to keys in a toast notification. In order to update a toast, the original toast
needs to include a databinding hashtable.
Required? false
Position? 4
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
LOTS...
OUTPUTS
NONE
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$FirstDataBinding = @{
FirstLine = 'Example Toast Heading'
SecondLine = 'This toast is still the original'
}
New-BurntToastNotification -Text 'FirstLine', 'SecondLine' -UniqueIdentifier 'ExampleToast' -DataBinding
$FirstDataBinding
$SecondDataBinding = @{
SecondLine = 'This toast has been updated!'
}
Update-BTNotification -UniqueIdentifier 'ExampleToast' -DataBinding $SecondDataBinding
RELATED LINKS
https://github.com/Windos/BurntToast/bl ... ication.md