Hello a have a file with 21 lines of code in power shell. I need a way to run this file with a button in c#. I use c# in Visual Studio 2010. Please let me know if there is a way to achieve.

```
// Powershell
$Proc = Get-Process | Sort-Object CPU -Descending
$cores = Get-WmiObject Win32_processor
$memory = Get-WmiObject Win32_OperatingSystem
$Total = 10
$num = 1

Clear-Content c:\scripts\prueba.txt

foreach ($objItm in $Proc) {
If ($num -gt $Total) {
    break #break the loop
}

[string] $strID=[System.Convert]::ToString($objItm.ID)
[string] $strProcessName=[System.Convert]::ToString($objItm.ProcessName)
[string] $strCPU=[System.Convert]::ToString($objItm.CPU)
[string] $strNUM=[System.Convert]::ToString($num)

$info=$strNUM+"-"+$strID+"-"+$strProcessName+"-"+$strCPU

$num += 1

$info|Add-Content c://scripts/prueba.txt

}
//Code c#
RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create(); 
Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration);
runspace.Open(); RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace);
Pipeline pipeline = runspace.CreatePipeline(); 
pipeline.Commands.Add(scriptFile)
Execute PowerShell script results = pipeline.Invoke();

```

I need for example press a button and make the script happens