title: Powershell: How to use Invoke-WmiMethod to Beep a Remote Computer?
body: <p>I am trying to use the following code to make a beep on a remote computer through Powershell:</p>
  
  <pre><code>Invoke-WmiMethod -Path Win32_Process -Name Create -ArgumentList "[console]::beep(500,300)" -ComputerName "mycompname"
  </code></pre>
  
  <p>In addition I have used <code>[System.Media.SystemSounds]::Beep.Play()</code> in place of the console command.
  It doesn't give any error codes and outputs this: </p>
  
  <p>__GENUS          : 2
  __CLASS          : __PARAMETERS
  __SUPERCLASS     :
  __DYNASTY        : __PARAMETERS
  __RELPATH        :
  __PROPERTY_COUNT : 2
  __DERIVATION     : {}
  __SERVER         :
  __NAMESPACE      :
  __PATH           :
  ProcessId        :
  ReturnValue      : 9
  PSComputerName   :</p>
  
  <p>I am running this command with elevated Powershell and I am an admin on the network.  Using <em>Invoke-Command</em> <strong>DOES NOT</strong> work on my computer, so I am opting for Invoke-WmiMethod instead.  The following code <strong>DOES</strong> actually work, so I don't understand why the beep one won't:</p>
  
  <pre><code>Invoke-WmiMethod -path Win32_Process -Name Create -ArgumentList "msg * 'hello'" -ComputerName "mycompname"
  </code></pre>
  
  <p>Final notes: I would like to be able to use Invoke-WmiMethod to do remote shutdown and taskkill, but those functions also do not work, only sending a message works.  Any help would be greatly appreciated.</p>