title: msg.exe sent to all users with response function
body: <p>I am trying to not log users off if they are still working by sending a msg and allowing the users to select &quot;Yes&quot; or &quot;No&quot;.  I am able to do this via wscript, but haven't found a way to do it via msg.  The reason I need to use msg is because it has to go to all users on the server.</p>
  <pre><code>$prompt = new-object -comobject wscript.shell 
  $answer = $prompt.popup(&quot;Are you still working?  The shutdown was triggered and this server will shut down.  This message will expire in 30 seconds`n&quot;,30,&quot;Idle Shutdown Triggered&quot;,0x4 + 0x20 + 0x1000)              
  if($answer -eq 6) {&quot;Yes You ARE!&quot;}
  if($answer -eq 7) {Invoke-WebRequest -Uri 'some api to stop the shutdown'-Method POST -Body $postParams}
  if($answer -eq -1) {Invoke-WebRequest -Uri 'some api to stop the shutdown'-Method POST -Body $postParams}
  </code></pre>
  <p>I have tested <code>msg * /W &quot;Message&quot;</code> and the prompt worked, but I need to execute the api url if no response or they say &quot;No&quot;</p>