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 : MonadMSHPowerShell
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 : MonadMSHPowerShell