From the course: Complete Guide to PowerShell 7
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Running simple commands - PowerShell Tutorial
From the course: Complete Guide to PowerShell 7
Running simple commands
- [Instructor] So let's look at running some simple commands. So this time around, I'm just going to use the standard Visual Studio Code and of course the terminal at the bottom here. Now if we take this first option here, there's a few things that we can do. The first one here is we can declare a variable with a specific location. So I'm going to say C:\Temp. I can right click here and say run selection, and this will execute that command there in the bottom. I can also then say, well, let's write out the output here, and it will say, initialize the log file. That was the message that we had. And then of course I can also use new item right here and say run selection, and that will actually create that new one for us. So you can see just some basic functions, like a variable with some text values, a write output, and then we can utilize new item. We can also use clear screen at any point. Now I'll just scroll down a little bit further here. We could also create a function. So this…
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
-
-
-
-
-
-
Basic command structure12m 11s
-
(Locked)
Running simple commands6m 45s
-
(Locked)
Using Get-Command6m 15s
-
(Locked)
Using Get-Help5m 57s
-
(Locked)
Common cmdlets overview6m 57s
-
(Locked)
Managing processes with Get-Process8m 1s
-
(Locked)
Working with services6m 37s
-
(Locked)
Running scripts interactively5m 22s
-
-
-
-
-
-
-
-
-
-
-