The Powershell call operator breaks my ISE

  • Thread starter Thread starter PowerNoob
  • Start date Start date
P

PowerNoob

Guest
Hello

I have been developing a Powershell script using Powershell ISE, and for the most part i am very happy about it, however i have encountered what i believe to be a bug in the call operator (&).

When i use the call operator followed by a "pure" string everything works as it should, the command works and ISE runs as usual, but when i use the call operator followed by a variable, the command executes correctly, however ISE will no longer use the intellisense function to automatically show a drop-down list of possible variables when using "$". It is still possible to press ctrl + space to force the drop-down to appear. This error will disappear when you delete the call operator or the variable.

Here is an eksample:
(This courses the problem)
$c = 'C:\Path\To\Script'
& $c

(This does not course the problem)
& 'C:\Path\To\Script'

I hope someone is able to help me understand what is happening here, and if it is a bug then give me an alternative solution to executing a script on the local PC though a script.

I use Powershell version 5.1.17763.503

Continue reading...
 
Back
Top