0

Say I run a powershell job as a user in one window, and then want to retrieve the results in another powershell window;

Is it possible to make it global somehow, so I can pull it up on another machine?

I imagine the answer I'm going to get is something along the lines of, "why don't you write it to a file instead"?

leeand00
  • 25,510
  • 39
  • 140
  • 297
  • Why don't you write it to a file? lol nah... So what is the use case here? Would you run it via remote powershell and you want the results returned to you or would you have it run in a scheduled task and you just want it to pop up the results on a different machine when done? – Patrick Mcvay Apr 18 '23 at 17:13
  • @PatrickMcvay I'm just talking about being able to use any powershell window to view the results; it always seems confined to just the powershell window I started it in. – leeand00 Jun 01 '23 at 14:26
  • I mean you could use remote powershell to essentially do that. Not really sure if that fits your current use case. Just feed it whatever credentials in the Enter-PSSession or Invoke-Command cmdlets that you want to run it as. Is that kind of what you were looking for or do you actually want to access the session variables in the one session from the other (not sure if this is possible)? Each window is technically a session FYI. – Patrick Mcvay Jun 06 '23 at 17:57

0 Answers0