Show a custom Notification
-
Just modify "TITTLE" and "NOTIFICATION" for your desired texts.
powershell [Reflection.Assembly]::LoadWithPartialName("""System.Windows.Forms""");$obj=New-Object Windows.Forms.NotifyIcon;$obj.Icon = [drawing.icon]::ExtractAssociatedIcon($PSHOME + """\powershell.exe""");$obj.Visible = $True;$obj.ShowBalloonTip(100000, """TITLE""","""NOTIFICATION""",2)>nulThe last number, before the last closing parenthesis, means the type of notification.
1 - Information
2 - Alert / Warning
3 - ErrorEdit1:
You can use Powershell functions/variables to improve your notifications.powershell [Reflection.Assembly]::LoadWithPartialName("""System.Windows.Forms""");$dateTime=Get-Date -Format HH:mm; $obj=New-Object Windows.Forms.NotifyIcon;$obj.Icon = [drawing.icon]::ExtractAssociatedIcon($PSHOME + """\powershell.exe""");$obj.Visible = $True;$obj.ShowBalloonTip(100000, """Hey """ + $env:UserName, """It's """ + $dateTime + """ drink some water!""",1)>nul
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login