There is a useful meterpreter script that allows to migrate meterpreter to another process by specifying its PID. Imagine I have my own session running. How could I migrate to another process without using metasploit? I know the question may sound vague. Even if you don't provide a complete answer but still give some pointers, I'd appreciate that.
There was recently a similar question here. The answer describes in a couple of steps how it works. In a second answer there is even a python example. I guess this also works relatively well with powershell - provided enough powershell programming expertise.