Create New-BurntToastNotification by Group or Tag #216
Unanswered
sravulapalli
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to create Burnt Toast Notifications and specify
tagId
orgroupId
and use those IDs to remove notifications usingRemove-BTNotification
command under a specific group or tag. Currently, I see theNew-BurntToastNotification
only has aUniqueIdentifier
field which can be used to remove notification, but unfortunately you can't group notifications based on UniqueIdentifier (since specifying same identifier replaces a notification) and I see there are no other params like group or tag that you can use to group new notifications under. I read the documentation and I couldn't find anything. Here's a sample of what I'm trying to achieve -// Create first Notification
args := []string{
"-Command",
fmt.Sprintf(
$title = "%s"; $message = "%s"; New-BurntToastNotification -UniqueIdentifier "unique123" -Group "group123" -Text $message
, title, message),}
cmd = exec.Command("powershell.exe", args...)
// Create another notification under the same group
args := []string{
"-Command",
fmt.Sprintf(
$title = "%s"; $message = "%s"; New-BurntToastNotification -UniqueIdentifier "unique456" -Group "group123" -Text $message
, title, message),}
cmd = exec.Command("powershell.exe", args...)
// Delete all notifications under a group (this should delete both notifications created under group123)
args := []string{
"-Command",
fmt.Sprintf(
$GroupId = "%s";Remove-BTNotification -Group $GroupId
, GroupId),}
Beta Was this translation helpful? Give feedback.
All reactions