I've investigated this forum. But do not seem to understand it good enough to find my answer. I'm absolutely new at Powershell.
I've a situation that I've started a ps1-script and need to execute another ps1-script to start in the background with passing parameters from the first script to the second.
Something like this (script1.ps1):
$var1 = "p1 (string value)"
$var2 = "p2 (string value)"
$var3 = "p3 (string value)"
$var4 = 4 # numeric value
$counter = 1
while ($counter -le $var4)
{
#call to script2.ps1 with passing the $var1 through $var4 as
#parameters so that script2.ps1 executes as a background process
#and works with the received parameters $var1 through $var4
# ??
$counter= $counter + 1
}
exit
########################################
I can't find 1 way to pass the parameters and start script2.ps1 in the background.
Really hoping that someone can help me.
THIA, Wim