Recap - Welcome Banner
Part of the PowerShell Basics section of Coddy's PowerShell journey. Lesson 5 of 28.
Challenge
EasyWrite a script that prints the banner a server health check shows when it starts.
- Start with a comment that says what the script does.
- Print a border of 20
=characters, the titleServer Health Check, and the border again. - Print
Date:followed by March 16, 2026 in the formatyyyy-MM-dd, made withGet-Date. - Print
Day:followed by the weekday name of the same date, made withGet-Date. - Print
Log:followed by the path ofhealth.login the folderlogs, made withJoin-Path.
To put text and a command on one line, join them with + and wrap the command in parentheses: "Day: " + (Get-Date ...).
Your script prints:
====================
Server Health Check
====================
Date: 2026-03-16
Day: Monday
Log: logs/health.logTry it yourself
# Write your banner script here
All lessons in PowerShell Basics
5Project: Password Checker
Project OverviewLength Check