none
PowerShell Cmdlets - Execute code when module (*.dll) is loaded RRS feed

  • Question

  • Hello,

    I have written my own PowerShell cmdlet, which also works. I would like to execute code when the module is loaded, to check various tasks. How can I execute code when PowerShell is loading the module? Does anyone have an example?

    Many thanks for the help

    • Moved by CoolDadTx Monday, November 26, 2018 3:01 PM PowerShell related
    Sunday, November 25, 2018 1:23 PM

All replies

  • This question is better suited for the PowerShell forums, not C#. They can explain to you how module loading works and how to execute code when the module is loaded. This isn't really specific to C#.

    Michael Taylor http://www.michaeltaylorp3.net

    Monday, November 26, 2018 3:00 PM