none
PowerShell event handling in C# RRS feed

  • Question

  • I know that in C# while using PowerShell, we can use something like below to add an error handler

    PowerShellInstance.Streams.Error.DataAdded      += ErrorHandlerFunction

    Within the function, The below code retrieves the error record

    ErrorRecord objErrorRecord    = ((PSDataCollection<ErrorRecord>)objObject)[IN_objDataAddedEventArgs.Index];

    I would like to know more details about the ErrorRecord, WarningRecord etc classes. Can anyone provide me links which provides such details other than MSDN links( I already have them)

    Thanks in advance


    • Edited by SQLNeophyte Wednesday, November 28, 2018 6:24 AM
    Wednesday, November 28, 2018 5:26 AM

Answers

All replies