Would like to run powershell code from inside a C++ program : 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.