Forum Discussion

cmontano's avatar
cmontano
Visitor
5 years ago

Windows Message Box

Hello,

 

We would like to send out a Windows pop-up message to all computers but having trouble via LogMeIn.

 

Please have a look at the following PowerShell commands.

 

Add-Type -AssemblyName PresentationCore,PresentationFramework

$ButtonType = [System.Windows.MessageBoxButton]:: OK
$MessageIcon = [System.Windows.MessageBoxImage]:: Warning
$MessageboxTitle = "Windows Updates"
$Messageboxbody = "Your computer needs to run important updates. It will automatically restart in an hour. Please save all your work! - IT Service Desk Team"

[System.Windows.MessageBox]:: Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)

 

When we execute it via Task (powershell remote command),  it gets stuck at 'executing'.

 

Is there something missing? Is there a security bypass we need to add to the code?

No RepliesBe the first to reply