HOWTO: Send Network Popup Message in Windows 7


In Windows XP, this service was convenient though very picky which allowed sending messages to all PCs in the net sent * domain. “Message text!” But there were significant restrictions on the number of characters that could be written in the message. Very often the messages did not fit, but this is not the worst thing: Messages often did not reach because someone had the service disconnected from someone, it just stopped and if a person blocked the PC, he would not see the message before unlocking his station. As a result of the search, the next solution to this problem was born. We will use POWERSHELL. Its only drawback is that the message can only be sent by the administrator. This howto helps to send network popup message in Windows 7


1. Sending messages on Windows 7.ps1:

   - #options
param (
$ message = (Read-Host -Prompt "Enter the message text to send:")
)
$ cComps = @ ()
$ OnlinePC = @ ()
$ OfflinePC = @ ()
# Create process variable with parameters
$ Proc = "msg.exe -v -time: 90000 * $ message"
# Getting All PCs from AD
$ cComps = GET-QADcomputer | % {$ _. Name}
Write-Host "Check the availability of PC, please wait ...` t "-NoNewline
$ cComps | Sort-Object name | % {
$ name = $ _
if (test-connection-computer $ name -quiet -Count 1) {$ OnlinePC + = $ name}
else {if (test-connection-computer $ name -quiet) {$ OnlinePC + = $ name} $ OfflinePC + = $ name}
}
Write-Host "Done!"
Write-Host "ON line PC:" $ OnlinePC.Count
Write-Host "OFF line PC:" $ OfflinePC.Count -ForegroundColor red
$ OnlinePC | % {
([WMICLASS] "\\ $ _ \ Root \ CimV2: Win32_Process"). Create ($ Proc) | Out-null
if ($?) {"Message to $ _ sent"} else {Write-Host "On $ _ problems sending a message" -BackgroundColor Black -ForegroundColor Red}
}
$ OfflinePC | % {
Write-Host $ _ "OFF Line" -BackgroundColor Red -ForegroundColor Black
}

Also consider using Action1 to send network popup message if:
- You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
- Some of your endpoints are laptops not connected to corporate network at all times.

Action1 is a cloud-based platform for software deployment, software/hardware inventory, patch management, endpoint configuration and more. It is free with basic functionality.


Other Relevant HOWTOs: