Jump to content

Passing different commands to same console instance

Recommended Posts

Hello all.  So I'm aware the title might not really convey what I am trying to do.  I have a series of powershell functions that I have written and compiled within a single powershell script file.  My goal is to create a GUI in auto it which will, when certain controls are polled, run one of the powershell functions in the script file I wrote.  In order for this to work, I have to "dot source" the script file into a powershell console session, and then call the function from within that same console session.  If you are having difficulty understanding what I mean, there is a tool freely available from Microsofts script repository which closely demonstrates what I am looking to do: Arposh Windows System Administration tool.  The page can be accessed here.  Below is a picture.  I am used to the "run" function immediately closing after runs the specified command, but I need it to stay open to 1) dot source function script and 2) run a function within that script.  I look forward to your responses.




Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...