13 Replies Latest reply on Apr 18, 2013 10:14 AM by MR-Z

    Remove a single line entry from vmx file for multiple vm's

    ws65insd Lurker

      I need some help removing a single entry from all my vm's vmx files.

      The line in question is...

       

      ideX:Y.present=false

       

      I had added that line to all of my vm's vmx file because of security hardening. I need to remove that line because Veeam can't recognize that entry and errors out when a backup is tried.

       

      The original script run was something like this...(just putting up the relavent parts)

       

      $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec

       

      $VMX10e = New-Object VMware.Vim.OptionValue

      $VMX10e.Key = "ideX:Y.present"

      $VMX10e.Value = "FALSE"

      $vmConfigSpec.ExtraConfig += $VMX10e

       

      At the end there is....

       

      $cluster = Get-Cluster $targetcluster | Get-VM %{

      $_.Extensiondata.ReconfigVM($vmConfigSpec)

      }

       

      Appreciate any help on this