Skip to content

Commit ce116eb

Browse files
authored
Display full module version in startup banner (fixes #1065) (#1070)
1 parent 5bf4a5a commit ce116eb

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/powershell/public/Invoke-ZtAssessment.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,19 @@ function Invoke-ZtAssessment {
208208
[CmdletBinding()]
209209
param ()
210210

211+
$version = $script:__ZtSession.ModuleVersion
212+
$title = "🛡️ Microsoft Zero Trust Assessment v$version"
213+
# Center the title within the 77-character inner box width.
214+
# The shield emoji displays as 2 cells but has .Length of 3, so subtract 1.
215+
$displayLen = $title.Length - 1
216+
$totalPad = 77 - $displayLen
217+
$leftPad = [math]::Ceiling($totalPad / 2)
218+
$rightPad = $totalPad - $leftPad
219+
$titleLine = "$(' ' * $leftPad)$title$(' ' * $rightPad)"
220+
211221
$banner = @"
212222
╔═════════════════════════════════════════════════════════════════════════════╗
213-
║ 🛡️ Microsoft Zero Trust Assessment v2 ║
223+
$titleLine
214224
║ ║
215225
║ Comprehensive security posture evaluation for your Microsoft 365 tenant ║
216226
╚═════════════════════════════════════════════════════════════════════════════╝

0 commit comments

Comments
 (0)