What do we get more than anything, notifications . I'm a fan of turning them off (when I can), but if you wanted to show notifications through Powershell, here's a way how to do that. A notification in Windows 10 Adding Windows Forms We are going to leverage the NotifyIcon class built into Windows Forms in order to display our notification in Powershell. This is possible through the Add-Type cmdlet available in Powershell. With the Add-Type cmdlet, we can add the Windows.Forms assembly directly into our Powershell instance and use types like we would in code. This can be done with the following code. Add-Type -AssemblyName System . Windows . Forms Once this assembly is loaded into memory, we can begin to set the properties of the NotifyIcon and display it from Powershell. Setting the properties Before we set the properties on our notification, we need to create a NotifyIcon first. This can be done with the New-Object cmdlet. $notification = New-Obje...
A technology blog where we explore concepts related to software and web development, sql, c#, powershell, .net core, programming advice, interview questions and other topics.