Git Product home page Git Product logo

Comments (7)

MichaelGrafnetter avatar MichaelGrafnetter commented on July 20, 2024 1

Most of the cmdlets only contain a couple of lines of code. This one is an exception.

from dsinternals.

MichaelGrafnetter avatar MichaelGrafnetter commented on July 20, 2024

As already discussed on Twitter, in C# projects, the official DSInternals NuGet libraries should be used instead of invoking the PowerShell cmdlets.

from dsinternals.

rios0rios0 avatar rios0rios0 commented on July 20, 2024

As already discussed on Twitter, in C# projects, the official DSInternals NuGet libraries should be used instead of invoking the PowerShell cmdlets.

Is there some example of how to do it, avoiding recreating all useful cmdlets?

from dsinternals.

MichaelGrafnetter avatar MichaelGrafnetter commented on July 20, 2024

Is there some example of how to do it, avoiding recreating all useful cmdlets?

Yes, see the source code of the PowerShell module itself, which is written in C# and uses the libraries to do all the heavy lifting.

from dsinternals.

rios0rios0 avatar rios0rios0 commented on July 20, 2024

Is there some example of how to do it, avoiding recreating all useful cmdlets?

Yes, see the source code of the PowerShell module itself, which is written in C# and uses the libraries to do all the heavy lifting.

Sorry, but I didn't find the documentation to do what I want...
For example: new TestPasswordQualityCommand().Execute()".
Is there a way to use the commands and not the classes only?

from dsinternals.

MichaelGrafnetter avatar MichaelGrafnetter commented on July 20, 2024

Is there a way to use the commands and not the classes only?

There of course is a way to create your own PowerShell host, but don't do it. Just copy out the C# code from a cmdlet and modify it to your needs.

from dsinternals.

rios0rios0 avatar rios0rios0 commented on July 20, 2024

Is there a way to use the commands and not the classes only?

There of course is a way to create your own PowerShell host, but don't do it. Just copy out the C# code from a cmdlet and modify it to your needs.

Ok, so, I'll have some work modifying to use with C# right?
There's no simple way, like import and use it...

Thanks for the answer.

from dsinternals.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.