Get-VM -Name VMName |Select Id
2. For that VM search in VMConfigs table with the following query.
Select id, uniqueid, * FROM [VMConfigs] where VMName like '%VMName%'
· In Uniquid check for the VMID (i.e. ea2e2418-3933-468a-9b32-687de931eefa:503330ab-1746-6aeb-9c45-e4407058cf12:vm-2413), Change VMId alone in the UniqueID.
· VMID from PowerShell script and above-mentioned id should be same, if not update the column with the id which we got from script (i.e. step 1)
3. Get the ID from the VMConfigs table for the respective VM and search in VMRuntimes table with the following query.
Select VmMor, VMId, CustomPropertiesString from [VMRuntimes] where VMConfigDataId = “Id from VMConfigs Table”
· Check VmMor, VMId and CustomPropertiesString are same as the Id that we got from script (step 1), if not update it.