none
Calling Powershell script from C#. RRS feed

  • Question

  • Hi Team,

    I am trying to call a powershell script from C#.

    The powershell script is working fine when we execute it at from command prompt.

    The script is having 3 user defined functions where in we are using many Azure cmdlets for the deployment.

    I am getting errors while executing it from C#.

    Can anyone please explain me what is the procedure of calling a powershell script ?

    Should we create Command Objects for each cmdlet and add it to the PipeLine.Commands list ?

    Or Is there anyway to hardcode this script in C# ( since it is working when we execute at the command prompt)

    I am getting the following error :

    Cannot invoke this function because the current host does not implement it.

    Can you please give some inputs on it to go ahead.

    Thanks,

    Srikrishna

     


    Srikrishna
    Wednesday, February 9, 2011 1:06 PM