Samples/Event Binding - Log File - Print Job Created.ps1
# EXAMPLE for PowerEvents PowerShell module available on http://powerevents.codeplex.com # # Author: Trevor Sullivan # Date: 11/28/10 # Brief: This example shows how to use PowerEvents to create a WMI event filter, consumer, and binding that logs a new print job to a text file. ${ScriptPath} = Split-Path $MyInvocation.MyCommand.Path New-WmiFilterToConsumerBinding ` -Consumer (& "${ScriptPath}\Event Consumers\Log File - Print Job Created.ps1") ` -Filter (& "${ScriptPath}\Event Filters\Windows\Event Filter - Print Job Created.ps1") |