Improve description

This commit is contained in:
Markus Fleschutz
2022-08-25 08:36:55 +02:00
parent 0e0dd641e3
commit 140c958b3d
3 changed files with 18 additions and 80 deletions

View File

@ -4,14 +4,14 @@
.DESCRIPTION
This PowerShell script shows a toast-message notification for the Windows 10 Notification Center.
.EXAMPLE
PS> ./show-notification
PS> ./show-notification "Hello World"
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
param([string]$Title = "Reminder", [string]$Text = "Hello World, this is a reminder.")
param([string]$Text = "Hello World", [string]$Title = "NOTE", [int]$Duration = 5000)
try {
Add-Type -AssemblyName System.Windows.Forms
@ -22,7 +22,7 @@ try {
$balloon.BalloonTipText = $Text
$balloon.BalloonTipTitle = $Title
$balloon.Visible = $true
$balloon.ShowBalloonTip(5000)
$balloon.ShowBalloonTip($Duration)
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"