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.
I would like to see the script to continue once the synchronisation is
launched.
Thanks in advance for your help.
romu
"Keith Hill [MVP]" wrote:
Quote:
> "Romu" <Romu@xxxxxx> wrote in message
> news:26878AEF-39AC-412F-96A3-5BB7775BC0B0@xxxxxx Quote:
> > Hi all,
> > All the question is in the title;
> >
> > I need to run an external process from my powershell script
> > asynchronously,
> > I want powershell to continue my script execution as soon as this process
> > is
> > started.
> >
> > Any idea?
> >
>
> If you are willing to give the PowerShell Community Extensions a try, you
> can use Start-Process like so:
>
> foo.ps1
> --------
> echo "Before"
> Start-Process csc.exe -arg '/?' -noshellexecute
> echo "!!!!! After !!!!!"
>
> --
> Keith Hill
> http://www.codeplex.com/powershellcx
>