I have a problem, I have a script which:
- Connect with PSSession (I use
PSSession
with admin account)
- Stop 2 process
- Do change on them files
- Start the 2 process (Problem here)
I want to start process on server, so i'm connect with PSSession (No problem)
I do Invoke-Command :
# $pathProg path to my program
Invoke-Command -session $mySession -command {Start-Process $($args[0])} -ArgumentList $pathProg
But it does nothing (I verify with VNC)
I do Invoke-Command too :
# $pathProg path to my program
Invoke-Command -session $mySession -command {&$($args[0])} -ArgumentList $pathProg
It lauch the program (Good) but my script wait the end program (Not good)
Anyone have an idea ?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…