A simple task in prior versions — open task manager, users, select all, send a message.
In 2012 — you can’t select more than one user. So if I want to send them a message, I’d have to do it one at a time.
I’ve tried msg command in elevated command prompt but it errors out — permissions setting which is unlocatable (not sure if that’s a word but I like it) in 2012.
Why is such a simple task so difficult. I would go on a further rant about 2012 but I’ll curb my tongue. Suffice to say — the enemy of good is better.
Thanks in advance
check
Best Answer
Since you were using the task manager, I’m assuming you were doing this on the server itself ? If you open a command prompt, type the ‘msg’ command to get the syntax.
I think it would be:
Msg * «Buy Me Lunch»
5 found this helpful
thumb_up
thumb_down
View Best Answer in replies below
Read these next…
Which network diagram (SAN to LAN) would you say is correct?
Networking
Which is best practice and why? Is it done one way over the other to avoid potential issues or is it just good housekeeping . . . or both?Edit for context . . . To the left — 3-node Hyper-V failover cluster connected to shared dual-controller storage via …
What kind of logs, data, or tooling do you have that need better visibility?
Windows
Hey,
I was part of a mass lay off awhile back, I am looking for work and
solutions to keep me busy while I continue to apply for jobs. Before I
was laid off I put together a small app that aggregated a lot of data
from GitLab with a simple sea…
Snap! — Keyboard Hat, Emotional AI, US High-Speed Trains, Astronaut Wears Prada
Spiceworks Originals
Your daily dose of tech news, in brief.
Welcome to the Snap!
Flashback: October 6, 1942: Photocopying Patented (Read more HERE.)
Bonus Flashback: October 6, 1992: US-Russia Human Spaceflight Agreement (Read more HERE.)
You need to hear…
Time Clocks
Hardware
We’re looking for a solution that would allow clients who participate in certain services to punch in and punch out on a time clock with a PIN versus fingerprint or prox card. We’d prefer the solution to be entirely local versus cloud based. We did look…
Alternative to Sophos central
Security
Hi there, I am a Sophos partner and currently have clients that run Sophos Essentials on their work machines — and it looks like our licenses are due for expiry soon. Would you guys suggest any alternative vendors that offer the same functionality as Soph…
Hi. It’s me. You are trying to upgrade a server but there are people logged in. You want to tell them all that you’ll be doing work, so you need to send a message…
It’s easy, but you’ll write it down anyways.
Open CMD..
Type msg * "your message here"
For example:
This will output a message like this:
Cheers to being courteous.
В Windows Server 2012 в консоли Server Manager в разделе управления настройками ролей Remote Desktop Services при выборе определённой Коллекции нам доступно окно управления клиентскими подключениями к серверам нашей фермы RDS, однако по какой-то странной причине разработчики этой самой консоли посчитали что функцию выбора более одного пользователя для отправки сообщения реализовывать не нужно, …наверно чтобы администраторам жизнь мёдом не казалась..
Поэтому в момент возникновения такой необходимости пришлось на скорую руку слепить небольшой PowerShell скрипт (должен выполняться на любом из серверов фермы), который позволит выполнить массовую рассылку сообщения всем подключенным пользователям фермы.
# $ConnectionBroker - Активный сервер RDCB. Если не указан, будет произведена попытка выявить его автоматически (для этого обязательно чтобы скрипт выполнялся на одном из серверов фермы RDS) # $SessionHostCollection – Имя RD-коллекции в которой нужно вывести сообщение. # $ConnectionBroker = "" $SessionHostCollection = "KOM-AD01-RDCOLL" $MessageTitle = "Сообщение от тех.поддержки SAP" $MessageText = "Уважаемые коллеги! В связи с проведением работ по расчету зарплаты - просьба в программе SAP Персонал с 11:00 до конца дня с табельными номерами не работать!" If ($ConnectionBroker -eq "") { $HAFarm = Get-RDConnectionBrokerHighAvailability $ConnectionBroker = $HAFarm.ActiveManagementServer } $Sessions = Get-RDUserSession -ConnectionBroker $ConnectionBroker -CollectionName $SessionHostCollection ForEach ($Session in $Sessions) { Send-RDUserMessage -HostServer $Session.ServerName -UnifiedSessionID $Session.UnifiedSessionID -MessageTitle $MessageTitle -MessageBody $MessageText }
В результате все активные пользователи на всех серверах фермы RDS получат всплывающее сообщение которое трудно не заметить…
Do you remember the net send command? And do you remember the security concerns? Last week I played with msg.exe. Msg is the “new” net send. I tried to send a message to all users and computers in my domain. Why? I wanted to instruct all users to close all open programs. And now I want to keep and share this knowledge in form of this blog post.
Introduction (msg.exe)
Msg sends a message to a user. This user must be logged in as a domain user (Domain Profile). Which means that the following only works in a domain environment. For network technicans: msg uses Port 445 (SMB/CIFS). If you send a message to a user you have to provide a computername and a username. Or you can try sending a message to yourself:
msg * "Hallo, this is a test!"
* means, that the message is send to all logged on users. Keep in mind that Windows is a multi-user operating system. Don’t forget the others! 😉
Prerequisites
The headline is somewhat misleading. Yes, we are going to send messages to all users, but actually to all computers. Suppose all your client computers are stored in specific Organizational Unit called Workstations. You want to inform all users logged on to this computers. I am going to use Invoke-Command. Make sure, your client computers accepts Remote PowerShell commands. You can run Enable-PSRemoting on each of them. Or you could configure WinRM by using Group Policies:
Group Policies: Enabling WinRM for Windows Client Operating Systems (Windows 10, Windows 8, Windows 7)
Summary
- All Computers must reside in the same domain
- WinRM has to be enabled on the client computers by running Enable-PSRemoting or by configuring via Group Policies, as described in the link above. Note that on Windows Server 2012/2016 operating systems WinRM is enabled by default, but not on Windows Client systems.
Sending Messages to all Users: PowerShell and Msg.exe in Action
The following One-Liner gets all the computernames of the OU Workstations in the domain sid-500.com. Afterwards msg is executed for each computer in the OU Workstations. The message is send to all users which are currently logged on.
(Get-ADComputer -SearchBase "OU=Workstations,DC=sid-500,DC=com" -Filter *).Name | Foreach-Object {Invoke-Command -ComputerName $_ {msg * "Please close all open files. The Server will be shut down in 5 Minutes"}}
Client01 is a member of the OU Workstation. Client01 receives the message.
Have fun playing with msg!
See also
For more remote actions see also:
PowerShell: Enable Remote Desktop on multiple Servers remotely (Bulk)
PowerShell: Using Restart-Computer to restart your Computer and Remote Computers
Published by Patrick Gruenauer
Microsoft MVP on PowerShell [2018-2023], IT-Trainer, IT-Consultant, MCSE: Cloud Platform and Infrastructure, Cisco Certified Academy Instructor.
View all posts by Patrick Gruenauer
- Remove From My Forums
-
Question
-
Hello fellow TechNet users.
I have been wondering how other companies are able to send a popup notification to all their logged in users notifying maintainance or whatever they want to send.
I’ve tried the msg command It only displayed the message on the server not the clients.
So what I want to do is:
Send a message to all clients that is logged in on their computers without having to specify each individual computer or account.
Is this possible?
EDIT: Windows Server 2008 Standard Edition
-
Edited by
Friday, September 4, 2015 12:48 PM
Included what server im running
-
Edited by
Answers
-
Net Send is not working on my server.
«NET SEND» is a very old command. If you are using a modern version of Windows, probably try this:
msg * /SERVER:server_name Message goes here. And more text here.
Don
(Please take a moment to «Vote as Helpful» and/or «Mark as Answer», where applicable.
This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)-
Proposed as answer by
Ethan HuaMicrosoft contingent staff
Thursday, September 10, 2015 6:51 AM -
Marked as answer by
Ethan HuaMicrosoft contingent staff
Wednesday, September 23, 2015 3:04 AM
-
Proposed as answer by
-
Windows XP was the last version of Windows to include the net send
command. The msg command functions similarly to the net send
command.
Please note that the MSG command is intended to be used as a messaging system to terminal server users, to use it between two standard Windows machines, you might need to change the
AllowRemoteRPC (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server) registry value data from 0 to 1 on the computer receiving the message.
For the systax of this command, please refer to this article:
https://technet.microsoft.com/en-us/library/cc771903.aspx
Hope this helps.Regards,
Ethan Hua
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
tnmff@microsoft.com-
Proposed as answer by
Ethan HuaMicrosoft contingent staff
Tuesday, September 22, 2015 5:01 AM -
Marked as answer by
Ethan HuaMicrosoft contingent staff
Wednesday, September 23, 2015 3:04 AM
-
Proposed as answer by