Tags "powershell" Result

Run PowerShell script in PowerShell 6 from C#

I have a PowerShell script which communicates with a REST server. This script only works in PowerShell 6. I want to call it from C#, because the C# program needs the info from the REST server, and I don't want to rewrite the REST code in C#. So basically, I want to run a PowerShell script from C#. However, in C#, PowerShell.Create(); creates a Pow

it1352 0 2020-07-09

No PowerShell in System.Management.Automation?

I'm having trouble getting the PowerShell class to resolve. I'm following along with the example in this question. I have a reference added to System.Management.Automation from C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll I have using System.Management.Automation; included at the top of m

it1352 2 2019-05-06

Unable to load handler for task

I've set up a windows server 2008 R2 VM. downloaded the build agent from visualstudio online. Registered it and set it up. Now for all the build types I've tried I get one of these messages (one for each type of build attempt): Unable to load task handler Process for task CmdLine with version 1.0.12. Unable to load task handler PowerShell for tas

it1352 0 2020-09-17