title: Getting "The remote server returned an error: (409) Conflict." when trying to add rows into azure table
body: <p>I am trying to upload azure table row using PowerShell and I am receiving the below error. Could this be due to wrong Azure Storage powershell modules? I am using Azure.Storage 4.0.2 module. </p>
  
  <p>Below is the Code:</p>
  
  <pre><code># Getting all the resource group
  $resource_group_list = Get-AzureRmResourceGroup
  
  # Iterating through the resource group
  foreach($resource_group_list_iterator in $resource_group_list){
  
      # Since the solution applies for virtual machines,
      # obtain the list of virtual machines for the resource group
      $virtual_machine_list = get-azurermvm -ResourceGroupName $resource_group_list_iterator.ResourceGroupName
  
      # Proceed only when resource group contains virtual machines
      if(!($virtual_machine_list -eq $null)){
  
          # Iterate through the virtual machine list
          foreach($virtual_machine_list_iterator in $virtual_machine_list){
  
              # Creat an unique ID by concatinating 'Resource Group name' and 'Virtual Machine name'
              $unique_id = $resource_group_list_iterator.ResourceGroupName + "__" + $virtual_machine_list_iterator.name
              Write-Host $unique_id
  
              # Obtain the tags associated with the virtual machines
              $virtual_machine_tags = (get-azurermvm -ResourceGroupName $resource_group_list_iterator.ResourceGroupName -Name $virtual_machine_list_iterator.name).Tags
  
              # Iterate over the tags to match the tag that we are looking for
              foreach($tag_iterator in $virtual_machine_tags){
      if($tag_iterator.keys -eq 'owner' -and $tag_iterator.values -eq 'ibm'){
  
          # Store the tags in a variable to later store it in Azure table
          $virtual_machine_tag = $tag_iterator.keys.ToString()
          $virtual_machine_value = $tag_iterator.Values.ToString()
  
  
          $partitionKey1 = $unique_id
          if($virtual_machine_tag -eq $null) {$virtual_machine_tag = $null}
          if($virtual_machine_value -eq $null) {$virtual_machine_value = $null}
  
      $hash = @{}
      $hash.Add('uniqueid',$unique_id)
      $hash.Add('key',$virtual_machine_tag)
      $hash.add('value',$virtual_machine_value)
  
      Add-StorageTableRow `
      -table $azure_table_object `
      -partitionKey $partitionKey1 `
      -rowKey ("CA") `
       -property $hash
  
          #Write-Output "Key: " $tag_iterator.keys
          #Write-Output "Value: " $tag_iterator.Values
      }
  }
  
  
              #Write-Host "Tags: " $virtual_machine_tags
              #Write-Host " "
          }
  
  
      }
  
  
  }
  </code></pre>
  
  <p>Below is the exception that I received:</p>
  
  <pre><code>Exception calling "Execute" with "1" argument(s): "The remote server returned an 
  error: (409) Conflict."
  At C:\Program Files\WindowsPowerShell\Modules\AzureRmStorageTable\1.0.0.21\AzureRmS
  torageTableCoreHelper.psm1:267 char:16
  + ...      return ($table.CloudTable.Execute((invoke-expression "[Microsoft ...
  +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : StorageException
  </code></pre>
  
  <p>I have gone thru few online resources on how to troubleshoot, but I did not get any solution. </p>