PowerShell ISE add-on to manage WMI permanent event filters, consumers, and bindings
When I am working with Windows PowerShell, PowerShell ISE is my second home. I prefer to do everything within PowerShell ISE and not move away from it to other tools. If you have followed my recent posts, I’ve released a custom DSC module for managing WMI permanent event filters, consumers, and bindings. While experimenting with this module, I had created multiple instances of these WMI objects. There were different ways to delete these objects. Trevor had created a WMIEventHelper utility and Boe converted that it into a WPF UI. I could, of course, delete these objects using PowerShell itself. However, none of this was really integrated into the PowerShell ISE UI.
Once you compile the DLL, you can load it using the Add-Type cmdlet and then add it to the vertical add-ons in ISE.
Add-Type -Path 'C:\Script\PSMag.dll' $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add('Events',[PSMag.WMIEventsAddon],$true)
I have only included the delete functionality in this initial release. While it is not tough to provide create functionality, it is low on my priority list at this moment. Since I will be using only the DSC resource module to create these WMI objects, I am exploring the ability to generate a DSC configuration script for each of the instances instead of using WMI directly.
The next update will have exploring instance details by double-clicking any of the instances. Stay tuned.Share on: