User PowerShell to send a pop-up

Posted On 2017-12-13 by Jitendr
Tags: Powershell Scripting Windows
Views: 86

Nothing magical here, just a little something to help get the attention of whoever is at the keyboard on a remote machine. This funtion 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"

About the Author

Jitendr has posted a total of 1 articles.

Comments On This Post

No comments on this post yet!

Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.

Your IP address is:

Before you can post, you need to prove you are human. If you log in, this test goes away.

Code Links