Can MSG do what NetSend did on XP?

#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.
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.