User PowerShell to Send a Pop-up

By | 2017-12-13

Nothing magical here, just a little something to help get the attention of whoever is at the keyboard on a remote machine. This function will allow you to pop up a message on a LAN-connected computer.

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"
    }
}

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.