What is the best way to go about executing a Powershell script in the Fake build automation tool ?
I feel that there should be an obvious answer to this question, but have not been able to find anything by searching.
What is the best way to go about executing a Powershell script in the Fake build automation tool ?
I feel that there should be an obvious answer to this question, but have not been able to find anything by searching.
As you mention in your comment, using the PowerShell
class makes this very easy.
#r "FakeLib.dll"
#r "System.Management.Automation"
open Fake
open System.Management.Automation
Target "RunSomePowerShell" <| fun _ ->
PowerShell.Create()
.AddScript("(Get-Process | ? ProcessName -eq 'chrome' | measure WorkingSet -Average).Average")
.Invoke()
|> Seq.iter (printfn "%O")