Windows 7 Can MSG do what NetSend did on XP?

mqh777

New Member
Joined
Sep 24, 2014
Messages
1
On Windows XP NetSend could broadcast a message to all systems on your network. Can the Windows 7 MSG do the same thing and if so how?

The help for MSG says this:

Send a message to a user.

MSG {username | sessionname | sessionid | @filename | *}
[/SERVER:servername] [/TIME:seconds] [/V] [/W] [message]

username Identifies the specified username.
sessionname The name of the session.
sessionid The ID of the session.
@filename Identifies a file containing a list of usernames,
sessionnames, and sessionids to send the message to.
* Send message to all sessions on specified server.
/SERVER:servername server to contact (default is current).
/TIME:seconds Time delay to wait for receiver to acknowledge msg.
/V Display information about actions being performed.
/W Wait for response from user, useful with /V.
message Message to send. If none specified, prompts for it
or reads from stdin.



Now I did get this to work for machines by doing this:

Use PowerShell to query AD and export out machine names to a .TXT file
Then read the .TXT file of machine names and run this command

$pc = Get-Content "c:\Temp\allWin7.txt"
foreach ($desktop in $pc)
{
msg /SERVER:$desktop * /TIME:2000 $Message
}


Can't MSG just find and broadcast to all machines without doing the above? Other non-technical people need to send out broadcast messages and I don't want to give them any PowerShell code. Also, my code above is static, I would have to rerun the AD Query each time I want to use it and it's slow. NetSend in XP was fast. I need the same functionality in Windows 7.

Any help would be great.
 


Solution
In Windows 7, the MSG command is primarily designed for sending messages to individual users on the local network. However, to broadcast messages to all machines on the network, you can try the following workaround: 1. Workaround using MSG: - As the MSG command doesn't have a built-in broadcast option, you can automate the process using a batch script to send messages to multiple machines. - Create a batch script that reads a list of computer names from a file and then sends a message to each one using MSG. 2. Alternative Tools: - PsExec: PsExec is a command-line tool that allows you to run commands on remote machines, including sending messages. It's part of the PsTools suite provided by Microsoft Sysinternals. - You...
In Windows 7, the MSG command is primarily designed for sending messages to individual users on the local network. However, to broadcast messages to all machines on the network, you can try the following workaround: 1. Workaround using MSG: - As the MSG command doesn't have a built-in broadcast option, you can automate the process using a batch script to send messages to multiple machines. - Create a batch script that reads a list of computer names from a file and then sends a message to each one using MSG. 2. Alternative Tools: - PsExec: PsExec is a command-line tool that allows you to run commands on remote machines, including sending messages. It's part of the PsTools suite provided by Microsoft Sysinternals. - You can use PsExec with a batch script to send messages to remote machines. It provides more flexibility for remote tasks. 3. Third-Party Solutions: - There are third-party software and network management tools available that offer broadcast messaging capabilities across a network. - These tools often provide a user-friendly interface for sending messages to multiple machines simultaneously. 4. PowerShell Script: - While you prefer not to use PowerShell directly, you can encapsulate the PowerShell script into a batch script for simpler execution. 5. Note: - Broadcasting messages to all machines in a network can be restricted by network policies, firewalls, or security settings, so ensure that network permissions allow for such messaging. - Script execution and message broadcasting may require administrative privileges on the machines for successful delivery. By utilizing these alternatives or creating batch scripts along with tools like PsExec, you can achieve a workaround to broadcast messages to multiple machines in a network without the need for individual PowerShell commands.
 


Solution
Back
Top