Hi,
I have a simple PowerShell script which contains just two functions, I would like to run through each of these functions, but in each one there is a condition where the function should terminate. so my script goes like this:
myfunc1
myfunc2
function myfunc1
{
If(some stuff)
{
things
}
ElseIf(some stuff)
{
things
}
Else
{
things
terminate/exit this function now
}
if(some stuff)
{
things
terminate/exit this function now
}
else
{
things
}
}
function myfunc2
{
If(some stuff)
{
things
}
ElseIf(some stuff)
{
things
}
Else
{
things
terminate/exit this function now
}
if(some stuff)
{
things
terminate/exit this function now
}
else
{
things
}
is this the correct way to call my functions consecutively, and how would i exit the first function so my script can continue with the second one?
thanks
Steve