PowerShell versions (5.1 vs 7+)
📖 Scenario: You work in an IT team that manages many Windows computers. You need to check which PowerShell version is installed on each computer to decide if you can use new features from PowerShell 7 or if you must stick to PowerShell 5.1.
🎯 Goal: Build a simple PowerShell script that shows the installed PowerShell version and tells if it is version 5.1 or older, or version 7 or newer.
📋 What You'll Learn
Create a variable to hold the PowerShell version information.
Create a variable to hold the version threshold number 7.
Use an if statement to check if the installed version is 7 or higher.
Print a message showing the installed version and whether it is 5.1 or older, or 7 or newer.
💡 Why This Matters
🌍 Real World
IT professionals often need to know which PowerShell version is installed to use the right commands and scripts safely.
💼 Career
Knowing how to check and compare software versions is a basic skill for system administrators and automation engineers.
Progress0 / 4 steps