How to write a PS interface to a C# application

Welcome Forums General PowerShell Q&A 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 7 years, 5 months ago.

  • Author
  • #6159

    Topics: 1562
    Replies: 0
    Points: 0
    Rank: Member

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

    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?


    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?

The topic ‘How to write a PS interface to a C# application’ is closed to new replies.