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 220.127.116.11”
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)
Step 2 – Download the .deb
Step 3 – Install Visual Studio Code
sudo dkpg –install ~/Downloads/code_1.4.0-1470329130_amd64.deb
Step 4 – Launch Visual Studio Code
Step 5 – Install the Extension For PowerShell
Step 6 – Enable PowerShell Extension
Step 7 – Restart Visual Studio Code
Step 8 – Launch Visual Studio Code and Save the Untitled file as Test1.ps1 file
Step 9 – Write PowerShell Commands. You will notice intellisence support available.
Step 10 – Go to Menu > View > Integrated Terminal (shortcut cntl + `)
It opens the bash terminal by default
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.
Added following lines of code
//The path of the shell that the terminal uses on Linux.
Step 12 – Restart Visual Studio Code
Step 13 – Go to Menu > View > Integrated Terminal (shortcut cntl + `)
It opens the PowerShell terminal by default now.
Step 14 – Type $PSVersionTable in console (terminal) and enter
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
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.