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