ADScripts/Test-Script.ps1

12 lines
472 B
PowerShell
Raw Permalink Normal View History

2023-09-14 11:13:58 -06:00
$textToSend = "For Example, you could do something like this..."
$brokenText = $textToSend.Split(" ")
Add-Type -AssemblyName PresentationCore,PresentationFramework
$ButtonType = [System.Windows.MessageBoxButton]::YesNo
$MessageIcon = [System.Windows.MessageBoxImage]::Error
foreach ($text in $brokenText) {
$MessageBody = $text
$MessageTitle = "Annoying Text Box"
$Result = [System.Windows.MessageBox]::Show($MessageBody,$MessageTitle,$ButtonType,$MessageIcon)
}