I'm trying to setup an API call that will trigger it to run a PowerShell script. I found this tut https://www.youtube.com/watch?v=cIrCce5l7NU on how to call it from a desktop app. But when I try to set it up I get errors and its not letting me setup "RuneSpace"
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace GSU_API
{
public class FIM_Functions
{
public string Run_FIM_Script_AD()
{
RunSpace runspace = RunSpaceFactory.CreateRuneSpace();
}
}
}
I have the requested package I think:
Not sure why this is giving error