1. 程式人生 > >PowerShell彈出WIN10通知

PowerShell彈出WIN10通知

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon 

$objNotifyIcon.Icon = "E:\git_project\yuanliwei.github.io\favicon.ico"
$objNotifyIcon.BalloonTipIcon = "Error" 
$objNotifyIcon.BalloonTipText = "A file needed to complete the operation could not be found."
$objNotifyIcon.BalloonTipTitle = "File Not Found" $objNotifyIcon.Visible = $True $objNotifyIcon.ShowBalloonTip(10000)