# FinalBuilder - System.Automation - Common Instance

**URL:** https://www.finalbuilder.com/forums/t/finalbuilder-system-automation-common-instance/6810
**Category:** Discussion
**Created:** [July 16, 2020, 9:55pm UTC](https://www.finalbuilder.com/forums/t/finalbuilder-system-automation-common-instance/6810 "2020-07-16T21:55:39Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![michael.thomason](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/59ef9b/32.png) [@michael.thomason](https://www.finalbuilder.com/forums/u/michael.thomason)
#### Post date: [July 16, 2020, 9:55pm UTC](https://www.finalbuilder.com/forums/t/finalbuilder-system-automation-common-instance/6810/1 "2020-07-16T21:55:40Z")

</div>

The FinalBuilder script editor and the ability to run inline scripts is excellent! However each action seems to create a new instance of System.Automation (.Net PowerShell Instance).

Generally this is a good idea but sometimes when you may want to persist a powershell session between actions. For example, in our example, we connect to vSphere via Connect-VIServer (PowerCLI) – which takes 10+ seconds, and then have other actions in the FB run script which may want to use the session token from a previous VIServer session. Since each action has a different action has a different PowerShell session instance the connection token from VIServer is invalid as it was closed when the previous PS session was closed.

Is there a way to have a common single automation session for all of FinalBuilder – maybe make this an option if it does not currently exist?

---

_[View the full topic](https://www.finalbuilder.com/forums/t/finalbuilder-system-automation-common-instance/6810)._
