param( [string]$Titulo = "ALERTA DE RED", [string]$Mensaje = "Problema detectado", [string]$Color = "Red" ) Add-Type -AssemblyName System.Windows.Forms Add-Type -AssemblyName System.Drawing try { [console]::beep(1000,500); Start-Sleep -Milliseconds 150 [console]::beep(1000,500); Start-Sleep -Milliseconds 150 [console]::beep(1000,500) } catch { try { [System.Media.SystemSounds]::Hand.Play() } catch { } } $form = New-Object System.Windows.Forms.Form $form.Text = $Titulo $form.Size = New-Object System.Drawing.Size(560,220) $form.StartPosition = "CenterScreen" $form.TopMost = $true $form.FormBorderStyle = "FixedDialog" $form.MaximizeBox = $false $form.MinimizeBox = $false switch ($Color) { "DarkOrange" { $form.BackColor = [System.Drawing.Color]::DarkOrange } default { $form.BackColor = [System.Drawing.Color]::Red } } $label = New-Object System.Windows.Forms.Label $label.Text = $Mensaje $label.ForeColor = [System.Drawing.Color]::White $label.Font = New-Object System.Drawing.Font("Arial",16,[System.Drawing.FontStyle]::Bold) $label.TextAlign = "MiddleCenter" $label.Dock = "Fill" $form.Controls.Add($label) $timer = New-Object System.Windows.Forms.Timer $timer.Interval = 10000 $timer.Add_Tick({ $timer.Stop() $form.Close() }) $timer.Start() $form.ShowDialog() | Out-Null $form.Dispose()