While Creating a Simple EventLog PsProvider -Part 2
I was finally able to add EntryType
dynamic parameter to Get-ChildItem
Been slacking off lately and finally made some time to extend Get-ChildItem
cmdlet in EventLog
Now, in the following screenshot, I am in the sys:
drive of type EventLog for System
returns list of all EventLogEntry objects for System EventLog.
Now, I can just filter the output to display according to the EventLogEntryType of each EventLogEntry.
And what's cool is that(well about PowerShell that is, not my provider), if I pass an invalid Enumeration value for EntryType parameter, it displays error message with valid enumeration values Error, Warning, Information, SuccessAudit, FailureAudit
It's PowerShell in the works... not my code that displays valid enum values.
Tags : Monad MSH PowerShell