Part 1 — Azure Subscription Signup
Part 2 — Switch from PowerShell ISE to Visual Studio Code
Part 3 — Get Started with a GitHub Repo (fork, clone, edit & push the repo)
Part 4 — Deploy Some Test Azure Resources & Azure AD Users
Part 5 — Use PowerShell to configure Lighthouse and Manage Resources in Another Subscription
I saw a long thread on twitter this week questioning why people still use ISE for PowerShell given its deprecated and it got me thinking. I’ve used PowerShell ISE since it was released. It’s easy to adopt, a great tool for beginners and it was installed on all my devices by default.
In the last few years I've switched to Visual Studio Code (VSCode)because it made writing Terraform a whole lot easier. Now I use VSCode for most things but if I didn't need to collaborate with my team to write large complicated pieces of code for Terraform deployments, I probably would have stuck with ISE.
If you’re keen to make the jump before ISE is no more, this post will quickly step through setting up Visual Studio Code with a terminal so it looks like the ISE you know and love.
Once it’s set up, we’ll download a basic repo from GitHub so you have something to test it out with.
First, Install VSCode and Git
- First up, download and install Visual Studio Code
- I also install Git on my local machine so I can use bash commands for pushing code into GitHub
Next, Make VSCode look like the ISE aka, Install VSCode Extensions & Set Up the Terminal
- For good measure, right click and run VSCode as administrator so we can install the PowerShell Cmdlets that we need
- As a next step, I like to always install the Shell Launcher VSCode extension so I can have an experience that's similar to the ISE.
If you’d like to do that click the “Extensions” button and search for Shell Launcher.
- To make VSCode look similar to PowerShell ISE, open up a new terminal.
- Now it looks a bit more familiar.
In the bottom right hand corner you should see that the terminal that has opened is PowerShell by default
CTRL + SHIFT + Pto open up the Commands menu
Shell Launcherto open up the extension
I followed the steps in the Shell Launcher instructions to create a shortcut but you don't have to do that and can always get to it using the commands menu
- You’ll be presented with your options, select
- Now VSCode looks pretty much like the ISE with added languages as a bonus!
- When testing out code, highlight the line you want to run and press
F8to run it just like you can in ISE.
- If you want to go all out open
File > Preferences > Colour Themeand choose the
ISEtheme to make it look 100% like the ISE :P
Dig a little deeper
- Thomas Maurer has published a script that will install all the developer tools on your machine quickly and easily
- This blog post has a bunch of VSCode Terminal power tips
- If you'd like a more thorough intro to VSCode check out the getting started guide which is full of great tips.
- Also check out the Free Code Camp Course — How to Increase Your Productivity in VS Code