title: Python Azure SDK virtual_machines.run_command
body: <p>Having trouble with the python azure sdk. When running a powershell command from portal.azure.com on the virtual machine &quot;run command&quot; section I am successfully able to execute <code>New-Item C:\test2.txt</code></p>
  <p>When I run it from the python azure sdk I am unable to perform this task. It completes and I can see a command was sent to the machine by looking in the activity log for the vm. Am I missing something?</p>
  <pre><code>def run_command(vm_name):
      compute_client = get_compute_connection()
      
      run_command_parameters = {
        'command_id': 'RunPowerShellScript',
        'script': [
            'New-Item C:\test2.txt'
        ]
      }
      
      command = compute_client.virtual_machines.run_command(
          resource_group,
          vm_name,
          run_command_parameters
      )
      
      r = command.result()
      print(r)
  
  run_command('vm12345')
  </code></pre>
  <p>this returns</p>
  <pre><code>{'additional_properties': {}, 'value': [&lt;azure.mgmt.compute.v2019_12_01.models._models_py3.InstanceViewStatus object at 0x0000029C15A7A108&gt;, &lt;azure.mgmt.compute.v2019_12_01.models._models_py3.InstanceViewStatus object at 0x0000029C15A7A648&gt;]}
  </code></pre>