I've looked through the settings and can't seem to find the ability to do this.
It's probably one of the main things I miss after using PowerGUI, is the ability to run a PS script that you have just written, without having to save it.
Sometimes I write a script, as a once-use case, but don't need it ever again.
maybe prompt to save, but allow to run without?
[PSS2014] Ability to run a script without saving
Forum rules
Do not post any licensing information in this forum.
Do not post any licensing information in this forum.
- Alexander Riedel
- Posts: 8489
- Last visit: Thu Apr 18, 2024 1:15 pm
- Been upvoted: 37 times
Re: [PSS2014] Ability to run a script without saving
A script, by definition, is a file. You have to dot source the name of the script for PowerShell to execute it.
In PowerShell there is a tremendous context difference between executing a script from a proper file and pasting that code into a shell and executing it.
In PowerShell there is a tremendous context difference between executing a script from a proper file and pasting that code into a shell and executing it.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: [PSS2014] Ability to run a script without saving
Hi Aaron,
try marking the whole (unsaved) file ("CTRL" + "A") and press the "run selected code" key-combination ("CTRL" + "F8").
This does not require you to save the file.
Cheers,
Bosparan
try marking the whole (unsaved) file ("CTRL" + "A") and press the "run selected code" key-combination ("CTRL" + "F8").
This does not require you to save the file.
Cheers,
Bosparan