From the course: PowerShell 7 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create your first script

Create your first script - PowerShell Tutorial

From the course: PowerShell 7 Essential Training

Start my 1-month free trial

Create your first script

- [Instructor] So now that we've looked at various components, commands and how to use variables, et cetera. One of the things you want to do now is actually create a first PowerShell script. Now, to do this, we're going to launch Visual Studio Code, which for me is the preferred editor at this point. And it's opened into a folder. And what I'm going to do here is I can say File, New File. And then you notice it creates an untitled one here. I'm just going to slide this over and then I'm going to say, File, Save As, and then I can give that a specific name. And notice, it tries to save it as plain text. So I can scroll down and choose PowerShell. And I'm going to call it My First Script. Okay, so we now have a PowerShell. And as before when we looked at the editor, you can see it's now ready, in the bottom section is my terminal. So any commands that I run here can be executed in the bottom. Now for now, I'm just going…

Contents