I don't see anything obviously wrong with your script but try this - replace the calls to the "CheckForRunningMongo" function with the code [((Get-Process "mongod" -ea SilentlyContinue)) -eq $null}] or try adding "()" to the end of the function call ["CheckForRunningMongo()"]
I think your precondition code is always returning true because you are not invoking the function and returning a result but simply returning a reference to the function.
But I could be wrong. :)
Sent from my iPhone
> --
> You received this message because you are subscribed to the Google Groups "psake-users" group.
> To post to this group, send email to psake...@googlegroups.com.
> To unsubscribe from this group, send email to psake-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/psake-users?hl=en.
>