Quantcast
Channel: ::::::::: PowerShell :::::::::
Viewing all articles
Browse latest Browse all 25

While Creating a Simple EventLog PsProvider -Part 2

$
0
0
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 provider.

Now, in the following screenshot, I am in the sys: drive of type EventLog for System EventLog.
Get-ChildItem 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 :

Viewing all articles
Browse latest Browse all 25

Trending Articles