Skip to content

Up and running in 4 steps

  1. Install the module
  2. Load it
  3. Connect to a node
  4. Run your first cmdlets
Step by step in Getting Started →

Automate Proxmox VE from PowerShell

The PowerCLI for Proxmox VE. A PowerShell module with a cmdlet for every endpoint of the Proxmox VE API (VMs, containers, storage, backups, cluster, access) that runs on your machine and talks only to the API.

By sysadmins, for sysadmins.

Built by Corsinvest, official Proxmox partner.

# install from the PowerShell Gallery
Install-Module Corsinvest.ProxmoxVE.Api
Import-Module Corsinvest.ProxmoxVE.Api
# connect to any node
Connect-PveCluster -HostsAndPorts pve01 `
-ApiToken 'automation@pve!ps=…'
# every VM and container of the cluster
Get-PveGuest | Format-Table vmid, name, node, status
Get-PveGuest | Format-Table vmid, name, node, type, status
vmidnamenodetypestatus
105testpve01lxcstopped
1000firewall01pve01qemurunning
1006dc01pve01qemurunning
100backup01pve02lxcrunning
102firewall02pve02qemurunning
203test-debianpve02qemustopped
1012mailstorepve02qemurunning
A few rows of a two-node test cluster, names changed.
PowerShell holding a shield with the Proxmox logo

The Proxmox VE web interface is made for one action at a time. Snapshot forty VMs before an update, list every VM with its disks for an audit, clone a template ten times, shut down a lab every evening: by hand it is slow and error-prone, and the shell of a node is not where you want to run your company’s scripts.

VMware administrators have PowerCLI for this. cv4pve-api-powershell is the same idea for Proxmox VE: the whole API as PowerShell cmdlets, so the scripts, scheduled tasks and habits you already have keep working: objects in the pipeline, Where-Object, Export-Csv, Get-Help.

The module runs where PowerShell 7 runs (Windows, Linux, macOS, a management VM, a CI runner) and talks only to the Proxmox VE REST API on port 8006. Nothing is installed on the nodes and no SSH is needed. What a script can do is what its API token or user is allowed to do: give it a token with just the privileges it needs, see Permissions.

The cv4pve suite follows the Unix philosophy: each tool does one thing and does it well. cv4pve-api-powershell is the one for your own PowerShell scripts: any API call, with objects. Prefer a command line that works in any shell? cv4pve-cli calls the same API with text output. For an inventory or a health check of the cluster, ready to run, see cv4pve-report and cv4pve-diag.

One cmdlet per endpoint and method, generated from the Proxmox VE API: its parameters, their types and allowed values come from the API itself.

Get-PveGuest finds VMs and containers by id, name, range, node, pool or tag, with exclusions; the same selection starts, stops or snapshots them all in one call.

Connect with an API token or a user and password, list several nodes and the first one that answers is used.

Every call returns the Proxmox VE data as PowerShell objects, with the HTTP outcome beside it: filter, sort, export to CSV.

Start a backup, a clone or a migration and wait for its task to finish, with a progress bar if you like.

Part of the cv4pve suite →

Write your first script

Install the module from the PowerShell Gallery, connect to any node, list your VMs.

ProxmoxMade by Corsinvest,
official Proxmox partner