0

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.

0

1 Answer 1

2

It's simply

$result = powershell.exe -file $ScriptPath $ParameterObject
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.