Powershell Remote Sessions Between APIs and Scripts?

Product: PowerShell Universal
Version: 1.5.7

Is there a way to store powershell remote sessions, in my case sessions to exchange online and security compliance center, and use the same session between APIs and Scripts?
I want to keep sessions open so that it’s faster running commands and don’t have to wait for the remote session to stay up.

2 Likes

I also have this question!

Also after a solution for this, anyone come up with one yet?

This isn’t possible as far as I know. You can use -PersistentRunspace on New-PSUEnvironment to create an environment that won’t reset the runspaces through executions so it will be faster for the API but this won’t affect jobs.

1 Like