Ok, so try using MSG like this:
MSG * /SERVER:computername /V /W "test message"
Use both /V and /W at the same time. Set computername to be the target computer.
The /V flag is for Verbose mode, which will output messages to your PowerShell terminal.
When you execute the command, you should immediately see the message
Sending message to session Console, display time 60
This indicates that the message was sent to the target computer.
When the user clicks the OK button, you should see the message
Message to session Console responded to by user
This indicates that the user clicked the button in the message box. However, if the time limit runs out the message box will close and you will receive the same message in your terminal, so this could happen even if the user did not see the message. If you want the message box to not have a time limit, but stay displayed until the user clicks OK, set /TIME:0 like this:
MSG * /SERVER:computername /TIME:0 /V /W "test message"
Also if the target computer is offline, you will receive an error message that looks like this:
Error 1722 getting session names
This indicates that the target computer could not be found on the network.