• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  1. Home
  2. mllacerda
  3. Posts
M
  • Profile
  • Following 0
  • Followers 0
  • Topics 1
  • Posts 1
  • Best 0
  • Controversial 0
  • Groups 0

Posts made by mllacerda

  • 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)>nul
    

    The last number, before the last closing parenthesis, means the type of notification.

    1 - Information
    2 - Alert / Warning
    3 - Error

    Edit1:
    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
    
    posted in Windows
    M
    mllacerda
    Aug 14, 2020, 7:19 PM