Running Commands and Writing a Script
Lab
Intermediate
0 h 20 m
2020-07-16
Lab Overview
Running Commands and Writing a Script Overview Throughout this series, you’ve been in the PowerShell console. You’ve been manually typing in commands, running them and seeing what comes back. That’s fine if you need to bang out a quick command to do something simple but the console’s going to fall short for more advanced tasks. PowerShell is called a scripting language for a reason - you write scripts with it. What’s a script? In PowerShell terms, a script is a combination of commands all working together to be run at one time. A script can be one to thousands of lines long. When PowerShell executes a script, it starts at the top and makes its way down to the bottom until it has run all of the code in the script.

Related Learning Path(s):
Getting Started with PowerShell 7
Objectives
  • To get you comfortable with the PowerShell console
  • To learn how to discover commands to run
  • To know where to look for help when you need it
Exercises
In this exercise, you will learn to run PowerShell commands and get help.
In this exercise, you will create and run your first PowerShell script.
Real-Time Lab
Not Registered?
Create Account
Already Registered?
Login
What are Labs?

Labs provide a live environment to get hands-on experience using the same tools and services in the real world.


Learn More