Skip to content

Get-PveGuest

Get VMs/CTs of the cluster from id, name, range, node, pool or tag.

Explained with examples in this guide.

Aliases: Get-PveVm

Get-PveGuest
[-PveTicket <PveTicket>]
[-VmIdOrName <string>]
[<CommonParameters>]
Parameter Type Required Pipeline Description
-PveTicket PveTicket No By property name Ticket data connection.
-VmIdOrName string No By value, by property name Comma separated items, the same selection of the cv4pve tools (e.g. 100,101,web01): id (100), range (100:110), name (web01), name with ‘%’ (‘%web%’ contains, ‘web%’ starts with, ‘%web’ ends with) or PowerShell wildcards (web*), ‘@node-pve1’ (also ‘@all-pve1’, ‘all-pve1’) all VM/CT on a node, ‘@pool-customer1’ all VM/CT in a pool and its nested pools, ‘@tag-customerA’ all VM/CT with a tag, ‘@all’ or ‘all’ all VM/CT of the cluster. An item starting with ‘-’ excludes what it selects (e.g. @all,-100,-@tag-template). Without it, all VM/CT.

PSCustomObject. VM/CT resources of the cluster (vmid, name, node, type, status, pool, tags…), each once, sorted by node and id.

Get-PveGuest -VmIdOrName '@tag-production,-@node-pve3'