Lesson 2/12
Mastering variables and data types
Discover PowerShell variables: string, integer, double, boolean, arrays and hashtables. Learn to declare, handle and type your data properly. Practical cases included: processes, files and paths.
☰
Contents
15
▾
0:00 Introduction to PowerShell and what we will cover 0:11 Variables and data types 3:52 Finding out a variable's type 4:29 Forcing a specific type on a variable 7:00 Concatenating strings 7:57 Arrays and how to work with them 10:57 Understanding hashtables (@{}) 12:30 A concrete example using a hashtable 15:22 The special variables: $home, $pwd, $profile 16:13 The $null variable and how to handle it 16:58 Using Get-Variable to list what is defined 17:35 Local scope and how far a variable reaches 18:20 A practical case on variable scope 19:19 Working with files and paths 20:39 Test-Path: checking a file or folder exists