How to write a PS interface to a C# application

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 7 months ago.

  • Author
    Posts
  • #6159

    by eugene-goldberg at 2013-02-21 06:44:54

    Greetings,
    I'm developing a C# Asp.NET application and I have some tasks in it, which would be better served by PowerShell.
    Is there a way to configure my PS environment to have access to objects that are defined my application assemblies?
    For example: one of my application's business objects is called "Server". What would it take to be able to say: Get-Object Server?

    -Eugene

    by DonJ at 2013-02-22 04:29:15

    Not really, no. PowerShell could certainly load and access nearly any .NET assembly, but you can't pass object references quite like that.

    Inside your app, are you shelling out to PowerShell, or instantiating the PowerShell engine as a .NET class?

You must be logged in to reply to this topic.