This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SWQL VM name exclusion

Hello,

We have the following query which returns VM names along with other data for Snapshots older than 3 days old. What I would like to know is if its possible to exclude VM's that feature "Replica" in there name, we don't need these on the report as its expected

SELECT vm.Name, vm.GuestState, vm.OldestSnapshotDate, vm.TotalStorageSizeUsed, vm.SnapshotSummaryCount, vm.PlatformID, vm.Status, vm.DetailsUrl, vm.Host.HostName, vm.Host.Cluster.Name AS ClusterName
FROM Orion.VIM.VirtualMachines vm
WHERE DayDiff(vm.OldestSnapshotDate, getUtcDate()) > 3

Thanks Sam

Parents
  • SELECT vm.Name, vm.GuestState, vm.MemUsage, vm.CpuLoad, vm.OldestSnapshotDate, vm.TotalStorageSizeUsed, vm.SnapshotSummaryCount,  vm.PlatformID, vm.Status, vm.DetailsUrl, vm.Host.HostName, vm.Host.Cluster.Name AS ClusterName

    FROM Orion.VIM.VirtualMachines vm

    WHERE vm.Name not like ('%replica') AND DayDiff(vm.OldestSnapshotDate, getUtcDate()) > 3

Reply
  • SELECT vm.Name, vm.GuestState, vm.MemUsage, vm.CpuLoad, vm.OldestSnapshotDate, vm.TotalStorageSizeUsed, vm.SnapshotSummaryCount,  vm.PlatformID, vm.Status, vm.DetailsUrl, vm.Host.HostName, vm.Host.Cluster.Name AS ClusterName

    FROM Orion.VIM.VirtualMachines vm

    WHERE vm.Name not like ('%replica') AND DayDiff(vm.OldestSnapshotDate, getUtcDate()) > 3

Children
No Data