I'm trying to access PowerShell from within C# and it seems as though I need to reference the namespace System.Management.Automation and I can't find it anywhere I've searched my C: drive, google and my MSDN subscription (searching for "powershell SDK") and I can't find anything.
So my questions are:
Is this the namespace where I'll find the PowerShell object referenced in the codeblock below (found here)?
If not what namespace do I need and where can I find it?
using (PowerShell PowerShellInst = PowerShell.Create()) { PowerShell ps = PowerShell.Create(); string param1= "my param"; string param2= "another param"; string scriptPath = <path to script>; ps.AddScript(File.ReadAllText(scriptPath)); ps.AddArgument(param1); ps.AddArgument(param2); ps.Invoke(); }