I want to be able to run like 30 lines of PowerShell script from my c++ program. I've heard it's a terrible idea, I don't care. I still would like to know how.
I just want to code directly in the C++ program, i do not want to externally call the PowerShell script. Is there any way to do this? If it's impossible, just say no.
For example
void runPScode() {
//command to tell compiler the following is PowerShell code
//a bunch of PowerShell code
}
Thanks!
I've looked for commands to do this and have read several 'similar' questions.