PowerShell_Scripts
PowerShell_Scripts copied to clipboard
Unable to find [System.Windows.Forms.ToolTipIcon] on windows7
I'm totally new in powershell, I add this:
Invoke-BalloonTip -Message 'This is a message from my function' -Title 'Attention!' -MessageType Info
to the bottom of Invoke-BalloonTip.ps1:

Then I execute it:
PS C:\Users\bruce\Desktop> .\Invoke-BalloonTip.ps1
The error showed up:

Add this to the top of your script.
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")