The following example just writes the whole event converted to JSON to the console: PS> Register-EngineEvent -SourceIdentifier "MyEvent" -Action You can consume the event by registering an event handler for the same source identifier. The watcher now sends notifications to PowerShell’s engine event queue using the source identifier “MyEvent”. New-FileSystemWatcher -SourceIdentifier "MyEvent" -Path C:\Tempfiles Please refer to the Microsoft’s reference documentation of the FileSystemWatcher class for the details.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |