• Training
  • 3495

Introduction to PowerShell

Online Virtual | Attend in Person

Level: 200

Prerequisites:
Basic scripting knowledge in any scripting language.

Course Objectives:
After completing this lab, you’ll have learned the fundamentals of PowerShell and should have a good understanding of how to automate daily tasks, site management, and much more using PowerShell.

Material:
Lab manual and presentations.

In this lab, you’ll learn the following:

– What is PowerShell – cmdlets, modules, aliases, profiles, and drives.
– Using the pipeline, objects, storing, knowing, and processing data.
– Functions, conditional statements, WMI, remoting, and best practices.

Chapters

  • Intro to PowerShell
    1. What is PowerShell?
    2. What can I do with PowerShell?
      1. Scripts
      2. UIs
      3. Desired State Config
      4. Discussion about some things I’ve written for clients
    3. Know your IDE
      1. PowerShell ISE
      2. Visual Studio Code
      3. Terminal
      4. Text Editor
    4. OOP and PowerShell
      1. Intro to the concept of Everything is an Object
      2. Properties/Methods
      3. PowerShell Case Sensitivity
    5. Hello World
      1. Running Lines vs. Script
      2. Tab Completion
      3. PowerShell Sessions
    6. Getting Help
      1. Get-Help, Get-Command, Get-Member
      2. Google
  • Cmdlets, Modules, Functions, and the Pipeline
    1. What is a Cmdlet?
      1. Types of Cmdlets
        1. Binary
        2. Script
      2. Intro to common Cmdlets
        1. Write-Host
        2. Write-Info/Error/Warning/Output
        3. Get-Content
        4. Out-File
        5. Out-Null
      3. Alias
        1. Why I don’t use them!
    2. What is a Module?
    3. What is the Pipeline?
    4. What is a Function?
  • Variables and Basic Datatypes
    1. What is a variable?
      1. User-defined Variables
      2. Environmental Variables
      3. Special Variables
        1. $null
        2. $ErrorPreference for example
      4. Global Variables
    2. What do you mean by DataTypes?
      1. String
        1. Expandable
        2. Literal
        3. String operations
      2. Integer
        1. Integer operations
      3. Boolean
        1. Bool operations (intro to comparing)
      4. Date
        1. Date operations
    3. Getting information about a variable
      1. GetType()
      2. Get-Member
    4. Parenthesis, Brackets, and Square Brackets
      1. Difference between the three
    5. Data Structures and Collections of Objects
      1. Simple Array
      2. ArrayList
      3. List<Type>
      4. Hash Table
      5. Creating Objects from Hash Table
    6. Conditionals, Time for a Decision
      1. Operators
      2. If/Then
      3. If/Then/Else
      4. If/Then/ElseIf
      5. Testing your Conditionals
      6. Combining Conditionals
        1. -and -or
      7. Switch
      8. Comparing to $null
    7. Loops, Loops, Loops
      1. While
      2. Do Until
      3. Do While
      4. For
      5. ForEach
      6. ForEach-Object
      7. (1..10) Example
    8. Error Handling
      1. What is an Error?
      2. Why am I handling it?
      3. Types of Errors
        1. Terminating
        2. Non-Terminating
        3. ErrorAction
      4. Pipeline Pollution
        1. What does Polluting the Pipeline mean?
        2. Example
        3. How to fix
    9. Getting data you want (Selecting, Filtering, Sorting)
      1. Select-Object
      2. Where-Object
      3. Sort-Object
    10. Functions
      1. What is a function?
      2. Why use a function? Or When to use a function?
      3. Writing Simple Functions
        1. Simple Function
        2. Simple Function w/Args
      4. Writing Advanced Functions
        1. Function with Params
        2. Function with Advanced Params
        3. Function with Advanced Params + Common Params
    11. Writing and using Cmdlets (Script based)
      1. Writing your own cmdlets
      2. Using your own cmdlets
    12. Dot Sourcing
      1. Manual Dot Sourcing
      2. Profile load dot sourcing

Latest posts