# encoding: ascii
# api: powershell
# title: Send-Popup
# description: Send a popup message to a user on a remote computer.
# version: 0.1
# type: function
# author: sdfsdfsdfsdfsdf
# license: CC0
# function: Send-Popup
# x-poshcode-id: 6440
# x-derived-from-id: 6448
# x-archived: 2016-08-14T13:41:00
# x-published: 2016-07-01T20:17:00
#
#
function Send-Popup {
param ($Computername,$Message)
if (Test-Connection -ComputerName $Computername -Count 1 -Quiet){
Invoke-Command -ComputerName $Computername -ScriptBlock { param ($m) msg * $m } -ArgumentList $Message
Write-Host "Message sent!"
} else {
Write-Host "Computer not online"
}
}