Formatting with -f operator
📖 Scenario: You are preparing a simple report for your team. You want to display names and scores neatly aligned in columns.
🎯 Goal: Build a PowerShell script that formats names and scores using the -f operator to align the output in columns.
📋 What You'll Learn
Create a hashtable with exact names and scores
Create a format string variable using the -f operator placeholders
Use a loop to format each name and score using the format string
Print the formatted lines to display aligned columns
💡 Why This Matters
🌍 Real World
Formatting output neatly is useful for reports, logs, and console displays where readability matters.
💼 Career
Many automation and scripting jobs require formatting data for clear presentation using PowerShell or similar tools.
Progress0 / 4 steps