PowerShell ISE on Ubuntu 14.04

In the last post covered the initial steps for

  • Installing PowerShell on Ubuntu 14.4
  • Running basic PowerShell Commands (cmdlets)

After doing that I was curious to understand how the PowerShell ISE works on open source. Some answers are available at PowerShell Magazine

search for “tmux”
search for “ISESteroids 2.6.1.0”

I have not worked on both of them so skip commenting on it for now.

I had heard about Visual Studio Code and PowerShell language support. I found some hints in the post Microsoft has open-sourced PowerShell for Linux, Macs. Repeat, Microsoft has open-sourced PowerShell

So with above, I tried testing script editing capabilities with Visual Studio Code on Ubuntu 14.04

Step 1 – Go To Visual Studio Code On Ubuntu 14.4 (https://code.visualstudio.com)

0

Step 2 – Download the .deb

1

2-1

Step 3 – Install Visual Studio Code

sudo dkpg –install ~/Downloads/code_1.4.0-1470329130_amd64.deb

2-2

2-3

Step 4 – Launch Visual Studio Code

3-0

3-1

Step 5 – Install the Extension For PowerShell

3-2

3-3

3-4

Step 6 – Enable PowerShell Extension

3-5

Step 7 – Restart Visual Studio Code

3-6

Step 8 – Launch Visual Studio Code and Save the Untitled file as Test1.ps1 file

3-7

Step 9 – Write PowerShell Commands. You will notice intellisence support available.

3-8

3-9

Step 10 – Go to Menu > View > Integrated Terminal (shortcut cntl + `)
It opens the bash terminal by default

3-10

Step 11 – Change Default Terminal from Menu > File > Preferences > User Settings

You will notice settings.json is empty. Whatever settings you add will override the default settings. I added entry to point to PowerShell.

3-11

3-12

Added following lines of code

//The path of the shell that the terminal uses on Linux.

“terminal.integrated.shell.linux”: “/opt/microsoft/powershell/6.0.0-alpha.9/powershell”

3-13

Step 12 – Restart Visual Studio Code

Step 13 – Go to Menu > View > Integrated Terminal (shortcut cntl + `)

It opens the PowerShell terminal by default now.

3-14

Step 14 – Type $PSVersionTable in console (terminal) and enter

3-15

Step 15 – In the editor type Get-ChildItem and Hit F8 key

It will run the command and produce the output but you won’t see it.

Step 16 – To see the output Go to Menu > View > Output

3-16

So Lessons Learnt are,

  • As of now, there is no official news on PowerShell ISE coming on open source.
  • Having said that, this is really a good beginning towards any client to any server management capabilities with PowerShell and Visual Studio Code (with PowerShell Extension). As it gets to final release and stabilizes in community, I expect to become more rich and smoothly integrated with open source editor (or with editing tool experiences)
  • The intellisence were not working consistently and fluently. There could be something about my VM. I will test later with another VM . I also check in communities for any such observations.

That’s it for now. I will continue exploring capabilities over next few days, So stay connected.

Advertisements