ErrorAction in advanced functions

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Ritmo2k Ritmo2k 3 months, 1 week ago.

  • Author
    Posts
  • #67017
    Profile photo of Ritmo2k
    Ritmo2k
    Participant

    It appears built in cmdlets inherit the ErrorAction passed to the containing function. I was hoping to find docs confirming this but was not successful.

    Is this behavior by design?

  • #67032
    Profile photo of Sam Boutros
    Sam Boutros
    Participant

    I've seen this behavior with all common parameters not only -erroraction. See this 2006 post by Jeff Snover 😉

    • #67044
      Profile photo of Ritmo2k
      Ritmo2k
      Participant

      Thanks for the confirmation Sam.

You must be logged in to reply to this topic.