i wrote a posh script running in a windows service. From specific action on the computer, I need to display a popup window warning the user.
$popupMsg = @" message "@
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[System.Windows.Forms.MessageBox]::Show($user+ $popupMsg,"Remote Connection Information","OK","Warning")
When I run this script from PowerGui, the popup displays fine, but when i run the windows service that runs this script, the popup won't show up. What's wrong in this ? Thanks people !
