We use a lot of BAT\CMD scripts for our day-to-day operations and due to their limitations, at times we sometimes have to rely VBS\PS scripts, called from those, then continue the batch script afterwards.
We have a security limitation in which those scripts can only be executed locally. I vaguely remember, once using a method of opening a PowerShell session from within the batch file, where native PS cmdlets can be used. I have since lost that code and was hoping that someone could share its syntax.
The intention is to pass information into and out of the PS session so that the batch file can respond according to the PS output?