MSG command giving Error 5 to domain admin

Posted on 2010-01-04
Last Modified: 2012-05-08
I'm trying to identify the location of some misnamed machines on my domain.

Some research indicates that net send has been discontinued with Vista so the msg command looks like the sole solution for sending a message to a desktop to ask them to contact the help desk.

I'm using a domain admin account on a Windows 7 box to send the message.  The unknown box will either be running Vista Business or XP Pro and should be connected to the domain.

I have tried several varieties of the following command:
msg /server:unknownhostname * "Please contact the help desk on extension 545"
(I have used *, 1, and console as the user name switch)
All attempts result in "Error 5 getting session names"

When replacing the unknown host name with my local host name all three varieties result in the expected pop up.

Any suggestions on how to correct this error, or an other work around are appreciated.
Question by:Williams Co IT Dept
    LVL 38

    Accepted Solution

    Setting the DWORD value AllowRemoteRPC to 1 under registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server will allow Vista Business machines to receive pop-ups from MSG.EXE.

    You could push out this change using Group Policy Preferences (if Client Side Extensions are installed) or with a Startup script.
    LVL 22

    Expert Comment

    It all depends if that machine has terminal services running....
    LVL 7

    Expert Comment

    Dear HaKiSaK,

    if you have a (read: Active Directory) domain there are plenty of better ways to locate misnamed computers.

    First off, if it's interresting you can find out who's currently loggedon using a simple tool from your own workstation. Go to and download the PsTools Suite. Extract them to %sysvol%\system32 (e.g. C:\Windows\System32). To use the tool simply type "psloggedon \\uknowncomputername" with a domain admin account and you will see who's loggedin.

    Alternativly you could put a small code snippet in the logon script that writes some information like hostname, current user, ip address, etc. to a text file somewhere.

    If I got a popup saying I need to call the Service Desk I think I'd be scared and run off.
    LVL 22

    Expert Comment

    I lost my nerves with MSG commands that never work...
    Here :

    free,easy to use , work on almost all windows , and you remain sane ....

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    I recently purchased an HP EliteBook 2540p notebook/laptop. It has two video ports on it – VGA and DisplayPort. HP offers an optional docking station for the 2540p that also has both a VGA port and a DisplayPort. There are numerous online reports do…
    Hi Friends, These registry tweaks will help you optimizing your Windows 7 system for any VDI. This will improve the machine performanance and can be used on normal systems also. These are few registry tweaks which will add value by enhancing the …
    This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now