Menu
CoddyTech

Recap - Welcome Banner

Part of the PowerShell Basics section of Coddy's PowerShell journey. Lesson 5 of 28.

challenge icon

Challenge

Easy

Write a script that prints the banner a server health check shows when it starts.

  1. Start with a comment that says what the script does.
  2. Print a border of 20 = characters, the title Server Health Check, and the border again.
  3. Print Date: followed by March 16, 2026 in the format yyyy-MM-dd, made with Get-Date.
  4. Print Day: followed by the weekday name of the same date, made with Get-Date.
  5. Print Log: followed by the path of health.log in the folder logs, made with Join-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.log

Try it yourself

# Write your banner script here

All lessons in PowerShell Basics