Setting up Visual Studio Code for PowerShell
Full-Access Members Only
Sorry, this lesson is only available to Server Academy Full-Access members. Become a Full-Access member now and get instant access to this and many more premium courses. Click the button below and get instant access now.
In this lesson, I'm going to show you how to download and install Visual Studio Code, and then how to set up your PowerShell development environment. Now, this is something that you can do instead of using the ISE.
So really quick. What I'm gonna do is go to my search browser and I'm gonna search for Visual Studio code and, visual Studio Code is a cross platform editor by Microsoft. There's all kinds of cool things you get access to as far as extensions. It has a massive extension marketplace, which is what we're seeing here on the left hand side.
You get access to things like GitHub Copilot, which is… AI powered code, so it'll make AI suggestions. So if you're running a for each loop, for example, it will automatically suggest how the syntax should look. And most of the time it's pretty accurate. Every once in a while it's wrong. But this is just my preferred way of writing all of my code over the ISE and just thought I would show you how to do that. Now you don't have to install this for the course, but what I will say is that when we get to the sections where we're creating a power show module, this is really going to save you a lot of time having this set up just the way that it works.
And there's also a lot of shortcuts that you can't do in the ISE. Quickly replacing text, for example, in the VBS code, you can double click a certain string, hit control D and it'll automatically select all the matches of that string. So if you want to rename a variable, it's really fast.
You can do things like write on more than one line at a time and all kinds of cool things that I'll show you. But to get started, I'm just going to go ahead and download this for windows. Because I'm on windows, this is windows server 2022. That I'm installing this on. Of course, that doesn't matter which version of Windows that you're on.
You can also install this on Linux or Windows Home, Windows Professional, or Windows Server 2019, 2016, doesn't matter. Alright I have this downloading now, so it's already complete. So what I'm going to do is just wait a second for this to finish scanning, and then I'll go ahead and open the file, which it looks like it's already done.
So I'm going to launch this and go ahead and start this installation.
Okay. It's just complaining that I'm logged into the administrator account. That's fine. I'm just going to go ahead and download and install it anyways. Because this is my test virtual machine that we're using here. So I don't really care too much about that. I'm going to accept the license terms, click next one thing I'm going to change is the create desktop icon. And I really like this open with code action and I'll add this to both of these. So what that will allow me to do is if I'm selecting a file, Which I actually don't, I don't know what files I have here, but if I had a text file, for example, like I'll just create one really quick and I right click this.
Server Academy Members Only
Sorry, this lesson is only available to Server Academy Full Access members. Become a Full-Access Member now and you’ll get instant access to all of our courses.