Tools Links Login

User PowerShell to send a pop-up

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

About this post

Posted: 2017-12-13
By: Jitendr
Viewed: 648 times

Categories

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.