@@ -12,7 +12,7 @@ $script:CustomClientId = $ClientId
1212$script :CustomTenantId = $TenantId
1313
1414# ========================= Version =========================
15- $script :Version = " 2.3.3 "
15+ $script :Version = " 2.3.4 "
1616
1717# ========================= Cross-Platform Keyboard Shortcuts =========================
1818# Detect if running on macOS (use built-in $IsMacOS variable if available)
@@ -263,7 +263,7 @@ public class PIMBrowserAuth
263263</head>
264264<body>
265265 <div class='container'>
266- <div class='brand'>[ E N T R A P I M ] <span class='version'>v2.3.3 </span></div>
266+ <div class='brand'>[ E N T R A P I M ] <span class='version'>v2.3.4 </span></div>
267267 <div class='checkmark'>✓</div>
268268 <h1>Authentication Successful</h1>
269269 <p>You can close this window and return to PowerShell.</p>
@@ -288,7 +288,7 @@ public class PIMBrowserAuth
288288</head>
289289<body>
290290 <div class='container'>
291- <div class='brand'>[ E N T R A P I M ] <span class='version'>v2.3.3 </span></div>
291+ <div class='brand'>[ E N T R A P I M ] <span class='version'>v2.3.4 </span></div>
292292 <div class='icon'>✕</div>
293293 <h1>Authentication Failed</h1>
294294 <p>Please close this window and try again.</p>
@@ -1864,8 +1864,23 @@ function Show-PIMGlobalHeader {
18641864 [switch ]$NoNewline ,
18651865 [string ]$ControlsText = $null
18661866 )
1867-
1868- Write-Host $Object - ForegroundColor $ForegroundColor - BackgroundColor $BackgroundColor - NoNewline:$NoNewline
1867+
1868+ # Linux/host combinations can report -1 for console colors; Write-Host rejects that value.
1869+ if ($null -ne $ForegroundColor -and [int ]$ForegroundColor -lt 0 ) { $ForegroundColor = $null }
1870+ if ($null -ne $BackgroundColor -and [int ]$BackgroundColor -lt 0 ) { $BackgroundColor = $null }
1871+
1872+ if ($null -ne $ForegroundColor -and $null -ne $BackgroundColor ) {
1873+ Write-Host $Object - ForegroundColor $ForegroundColor - BackgroundColor $BackgroundColor - NoNewline:$NoNewline
1874+ }
1875+ elseif ($null -ne $ForegroundColor ) {
1876+ Write-Host $Object - ForegroundColor $ForegroundColor - NoNewline:$NoNewline
1877+ }
1878+ elseif ($null -ne $BackgroundColor ) {
1879+ Write-Host $Object - BackgroundColor $BackgroundColor - NoNewline:$NoNewline
1880+ }
1881+ else {
1882+ Write-Host $Object - NoNewline:$NoNewline
1883+ }
18691884
18701885 # Only show control bar when explicitly requested
18711886 if ($ControlsText ) {
0 commit comments