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 - PowerShell Tutorial
From the course: PowerShell 7 Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
PowerShell security6m 15s
-
(Locked)
Create your first script8m 30s
-
(Locked)
Parameter attributes for scripts and functions15m 16s
-
(Locked)
Select information10m 24s
-
(Locked)
Filter specific data10m 43s
-
(Locked)
Control the flow of PowerShell8m 31s
-
(Locked)
Ternary operators2m 39s
-
(Locked)
Switch statements3m 58s
-
(Locked)
Define custom help9m 22s
-
(Locked)
-
-
-