- Ever used a command line interface? Whether it's in Windows or Linux or Unix, Power shell works in much the same way. For example, you've probably run a command like ipconfig. Works the same way in Windows power shell. Maybe you're used to running ipconfig/all to get more information. Works the same way in Windows power shell. Maybe you're used to CLS to clear the screen. That works. You can ping, we'll just ping localhost and yep, the ping command works exactly the same.
So this isn't a scripting language really. It's just a command line shell. You type a command, you hit enter, you get results. If that wasn't the command you wanted, you just change it, add some parameters to flip up the behavior and run it again. So this isn't like you have to be in a programming environment or working around in visual studio or anything like that. It's just a command line environment. And a lot of the commands that you would use in other Windows shells, like command .xe, they work here too.
Cd to change directory, cls, which I pointed out earlier, clears the screen. Dir, to get a listing of files and folders. Maybe you come from a Unix or Linux background and a command like dir isn't one you would think of. You would think of ls, well, that's there too. So power shell has a lot of the same commands that you're used to working with. If you want to del a file, that removes it from the system. Maybe you're going to rm the file instead, or remove it ,because you've got that Unix or Linux background, it's all the same.
The only thing to watch out for is some of the commands are not quite the same. When you look at a command like ping that works the same as ping anywhere else in Windows because ping is actually an external executable. It's a little application that gets run. When you're running some of the built in, especially the file and folder management commands, that's where you'll notice some differences. For example, if I run dir/s, now normally in Windows, that's going to get me a directory and include all the sub directories.
And in power shell it gets me an error message, because this isn't really the dir command. In fact, if you look at the error message, it's kind of cluing you in. It's telling you the real name of this is get-child-item. Well so what is dir? Dir is what power shell calls an alias, it's a nickname. It means instead of having to type get-child, that just takes too long, I have a shorter version dir, or an even shorter version, ls. There's actually a gci, get-child-item, which is kind of a power shell style alias since it refers to the actual power shell command name.
So because these are slightly different commands they do work slightly differently. And in a little bit, you're going to learn how to use the help system, so power shell will be able to teach you how they work. For the most part you're going to find the commands you're used to using in any shell are going to work the same way that they always have. For example, cd program files, and instead of typing that out, I'm just going to hit tab, that will complete it for me, changed to the directory. Cd.. goes up a level.
So a lot of these commands that you're used to will work the same. It's just there are minor differences because this isn't a command it's an alias to an underlying power shell command. So, kind of once you get used to that little bit of difference, all these things will work out fairly well. And yes, it's a little bit of learning a new syntax but that's what you're here for, and you'll definitely pick it up as you go.
Author
Released
3/10/2012Skill Level Intermediate
Duration
Views
Related Courses
-
Learning Virtualization
with Martin Guidry2h 51m Beginner -
Windows 7: Networking and Security
with Steve Fullmer4h 44m Intermediate
-
1. Introduction to Windows PowerShell
-
Find PowerShell1m 10s
-
Customize PowerShell2m 29s
-
2. Run Commands in PowerShell
-
Run basic commands3m 32s
-
Use PSDrives4m 29s
-
3. The PowerShell Help System
-
Use the help system4m 32s
-
Find commands in help3m 28s
-
Use parameters to add values4m 17s
-
Use online help4m 9s
-
4. The PowerShell Pipeline
-
Import and export: CSV5m 10s
-
Import and export: XML4m 7s
-
Output to a file or printer6m 14s
-
Convert data to HTML3m 23s
-
5. Extend PowerShell
-
Find and add PSSnapins2m 43s
-
6. Objects: Data, by Another Name
-
Discover the object's output6m 44s
-
Sort objects2m 50s
-
7. Dig Deeper into the PowerShell Pipeline
-
Use pipeline input: ByValue5m 19s
-
8. PowerShell Formatting
-
Use the default formatting3m 50s
-
Format wide lists1m 16s
-
Format regular lists2m 13s
-
Format tables4m 11s
-
Learn to format last3m 55s
-
9. Comparisons and Filtering
-
10. PowerShell Remoting
-
Enable PowerShell remoting1m 57s
-
Use one-to-one remoting4m 11s
-
Use one-to-many remoting4m 12s
-
11. PowerShell Jobs
-
Start a job2m 28s
-
Manage job objects4m 54s
-
12. Windows Management Instrumentation
-
Explore WMI5m 2s
-
13. Work with Multiple Objects at Once
-
14. PowerShell Security
-
Understand trust2m 17s
-
15. PowerShell Variables
-
Use variables1m 46s
-
Name variables3m 44s
-
Use single and double quotes4m 37s
-
Use arrays1m 30s
-
Give variables a data type2m 48s
-
16. Input and Output
-
Prompt for user input1m 11s
-
Write output to the pipeline3m 42s
-
Write other messages1m 24s
-
17. Remoting Sessions
-
Create reusable sessions2m 38s
-
18. Turning Commands into Reusable Tools
-
Create a command4m 17s
-
Document a script3m 15s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Run basic commands