4

I'm writing a Build Process (wrapping msbuild in my module) for 350+ projects (VS 2010). This module now includes lots of Functions. Although, it is working efficently, but , I've started considering writing a Dll instead of script based module. Also because I may use Win-Forms (C#) in these dlls.

I'm Googling for the performance and other issues for both approach, but not getting sufficient info.

If anyone have experience related to this, kindly give some advice that which approach is better for PS Modules: Binary(.dll) or Script(.psm1)

Regards

1 Answer 1

3

Starting with PowerShell 2.0, there is no difference in implementing a cmdlet as script or binary. In fact, whatever is available to a binary cmdlet is available to a script cmdlet with respect to cmdlet arguments and other features. You can read more about Advanced Functions to understand this.

To me, it all boils down to the choice of language. If you are comfortable with .NET and C#, you may want to implement a binary cmdlet. Otherwise, just go for a script module which will serve the same purpose.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Ravi. I'm more concentrated towards performance and use of other .net features like Winforms in some parts of UI. Well, even if I'm confortable with .net and c#, developing a cmdlet means I'll have to be confortable with PS script as well :).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.