::::::::: PowerShell :::::::::
Saturday, October 14, 2006
  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 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 :
 
Comments: Post a Comment



<< Home
Let's get lazy with PowerShell!

Name:
Location: Flushing, NY, United States

Experimenting with a different format of blogs...

Links
ARCHIVES
10/01/2005 - 11/01/2005 / 11/01/2005 - 12/01/2005 / 12/01/2005 - 01/01/2006 / 01/01/2006 - 02/01/2006 / 02/01/2006 - 03/01/2006 / 03/01/2006 - 04/01/2006 / 04/01/2006 - 05/01/2006 / 05/01/2006 - 06/01/2006 / 06/01/2006 - 07/01/2006 / 07/01/2006 - 08/01/2006 / 08/01/2006 - 09/01/2006 / 10/01/2006 - 11/01/2006 / 11/01/2006 - 12/01/2006 /


Powered by Blogger