Positional args
from virtualshell import Shell with Shell() as sh: res = sh.script("./scripts/do_stuff.ps1", args=["arg1", "arg2"])
Named args
from virtualshell import Shell with Shell() as sh: res = sh.script("./scripts/do_stuff.ps1", args={"Name": "World", "Count": "5"})
Dot‑sourcing (mutates session state)
from virtualshell import Shell with Shell() as sh: res = sh.script("./scripts/profile.ps1", dot_source=True)
Async scripts
from virtualshell import Shell with Shell() as sh: fut = sh.script_async("./scripts/do_stuff.ps1", args={"Path": "."}) print(fut.result().out)
There was an error while loading. Please reload this page.