I'm have unpleasant feeling that I will be told "it's not possible".
In ISE and every other GUI powershell editor if I have a script which I'm working on and say I put "$x=10" and then execute script, I can go back to console and check value of that variable after script stopped running. It does not work this way in PowerShell Studio or I'm missing something?
How do I access variable from command line after script finished
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- artisticcheese
- Posts: 12
- Last visit: Mon Sep 12, 2016 9:21 am
Re: How do I access variable from command line after script finished
PowerShell Studio allows you to run your scripts directly in the console (Ctrl + Shift + F5) this way you can query the values at will and maintain a persistent session.
If you wish to use the internal PowerShell Studio host, you will need to set a breakpoint and Debug (F5) the script. When the debugger breaks, you can use the Debug Console or the Watch Panel to query the values. Note: PowerShell Studio will also retain a snapshot of the session variables at the last breakpoint when the debug session ends.
David
If you wish to use the internal PowerShell Studio host, you will need to set a breakpoint and Debug (F5) the script. When the debugger breaks, you can use the Debug Console or the Watch Panel to query the values. Note: PowerShell Studio will also retain a snapshot of the session variables at the last breakpoint when the debug session ends.
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- artisticcheese
- Posts: 12
- Last visit: Mon Sep 12, 2016 9:21 am
Re: How do I access variable from command line after script finished
Thanks. Is there a way to modify ribbon to have run in console as default Run method?
Re: How do I access variable from command line after script finished
You can't change the Ribbon itself, but you can add the "Run in Console" button to quick access bar by right-clicking on the button in the ribbon and selecting "Add to Quick Access Toolbar" from the context menu:
You can also use the Ctrl + Shift + F5 keyboard shortcut.
David
You can also use the Ctrl + Shift + F5 keyboard shortcut.
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.