Visible Timer feature added for Show-InstallationPrompt (troubleshooting)

sorry, I keep trying to add more code, but it keeps bouncing out. Here’s what I added in shorter bites.

Process {
	## Bypass if in non-interactive mode
	If ($deployModeSilent) {
		Write-Log -Message "Bypassing Installation Prompt [Mode: $deployMode]... $Message" -Source ${CmdletName}
		Return
	}
	
	## Get parameters for calling function asynchronously
	[hashtable]$installPromptParameters = $psBoundParameters
	
	## Check if the countdown was specified
	If ($timeout -gt $configInstallationUITimeout) {
		[string]$CountdownTimeoutErr = "The installation UI dialog timeout cannot be longer than the timeout specified in the XML configuration file."
		Write-Log -Message $CountdownTimeoutErr -Severity 3 -Source ${CmdletName}
		Throw $CountdownTimeoutErr
	}
	
	[Windows.Forms.Application]::EnableVisualStyles()
	$formInstallationPrompt = New-Object -TypeName 'System.Windows.Forms.Form'
	$pictureBanner = New-Object -TypeName 'System.Windows.Forms.PictureBox'
	$pictureIcon = New-Object -TypeName 'System.Windows.Forms.PictureBox'
	$timerCountdown = New-Object -TypeName 'System.Windows.Forms.Timer'
	$labelCountdown = New-Object -TypeName 'System.Windows.Forms.Label'
	$labelTimeRemaining = New-Object -TypeName 'System.Windows.Forms.Label'
	$labelText = New-Object -TypeName 'System.Windows.Forms.Label'
	$buttonRight = New-Object -TypeName 'System.Windows.Forms.Button'
	$buttonMiddle = New-Object -TypeName 'System.Windows.Forms.Button'
	$buttonLeft = New-Object -TypeName 'System.Windows.Forms.Button'
	$buttonAbort = New-Object -TypeName 'System.Windows.Forms.Button'
	$InitialFormInstallationPromptWindowState = New-Object -TypeName 'System.Windows.Forms.FormWindowState' `
<code>		## Label Time Remaining
		$labelTimeRemaining.Location = &#039;20,138&#039;
		$labelTimeRemaining.Name = &#039;labelTimeRemaining&#039;
		$labelTimeRemaining.Size = $buttonsize
		$labelTimeRemaining.TabIndex = 4
		$labelTimeRemaining.Text = $timeout
		$labelTimeRemaining.TextAlign = &#039;MiddleCenter&#039;
		
		## Label Countdown
		$labelCountdown.Font = &#039;Microsoft Sans Serif, 18pt, style=Bold&#039;
		$labelCountdown.Location = &#039;170,200&#039;
		$labelCountdown.Name = &#039;labelCountdown&#039;
		$labelCountdown.TabIndex = 5
		$labelCountdown.Text = &#039;00:00:00&#039;
		$labelCountdown.TextAlign = &#039;MiddleCenter&#039;
		
	[datetime]$startTime = Get-Date
   [datetime]$countdownTime = $startTime

	## Timer
			[datetime]$countdownTime = $startTime.AddSeconds($timeout)
			$timer = New-Object -TypeName &#039;System.Windows.Forms.Timer&#039;
		$timer.Interval = ($timeout * 1000)
		$timer.Add_Tick({
			Write-Log -Message &#039;Installation action not taken within a reasonable amount of time.&#039; -Source ${CmdletName}
			$buttonAbort.PerformClick()

		})
			$timer.Start()
			[timespan]$remainingTime = $countdownTime.Subtract($Starttime)
			$labelCountdown.Text = [string]::Format(&#039;{0}:{1:d2}:{2:d2}&#039;, $remainingTime.Hours, $remainingTime.Minutes, $remainingTime.Seconds)</code>