My main Script is Powershell 7, but i want to run a function in powershell 5 (because this function is only possible in powershell 5).
I also want to give the function a psobject and return a psobject, can anyone help me?
I tried to start it my Start-Process but it doesn't start correctly.
It's simply
$result = powershell.exe -file $ScriptPath $ParameterObject