View Single Post
Old 05-15-2008   #5 (permalink)
Marco Shaw [MVP]


 
 

Re: Running an external process asynchronously

Romu wrote:
Quote:

> Many thanks guys,
> Indeed I just realized that the thing I need to call asynchronously is a
> powershell function of my own.
>
> An example :
> #The function
> function Synchronise(computername)
> {
> ...
> }
>
>
> #The script
> Synchronise(PC1)
> Synchronise(PC2)
> Synchronise(LINUX1)
> Synchronise(MAC1)
>
>
> My function Synchronise is called several times and I need to run
> asynchronously. This function is used to synchronise a set of files and
> folders on computers and it's called several times because we synchronise
> several computers.
Yup, the solutions Keith and I proposed could be embedded within your
functions. The only thing not evident to me (this early in the morning
;-)) is if you expected to somehow return the results from the function.

I can't think of another easier way for you to attempt what you want.

Marco
My System SpecsSystem Spec