I make a remote desktop connection into my dev PC from my main PC.
I've noticed that from within the PowerShell 3 ISE command line, if I specify the name of a ps1 script file and then press the hyphen (-) it tries to launch the script. Luckily I get prompted with the "Security warning" box and can click "Do not run" to get back to the command prompt and finish typing the command line. It even does it if I am part way through typing a parameter that contains a hyphen. e.g.
.\script.ps1 -
.\script.ps1 something-
This behaviour happens on my old dev PC running Windows 7 64-bit and also on my new one running Server 2012.
On my main PC, on the "proper" console (i.e. not an RDP session) I do not see this behaviour.
Is it a bug or have I managed to do something weird to both my dev PCs? It's really annoying!