Manage Veeam v9.5 Server with PowerShell

Manage Veeam v9.5 Server with PowerShell

We can manage Veeam server with PowerShell, to do that first we need to install Veeam management Console on Workstation from which we want to manage backup server. PowerShell snapin will be installed by default, we don’t need to select anything during installation, Veeam require PowerShell version 2 minimum.


Veeam Backup & Replication Console installation


Veeam system configuration check

After installation we can open Veeam PowerShell directly from Backup Console, from drop-down menu choose Console > PowerShell. PowerShell console will be open and PSSnapin automatically added. We can manually load the PSSnapin to different PowerShell console or ISE console.


PowerShell Console opening from Veeam


PowerShell console with preloaded snapin

Running Add-PSSnapin VeeamPSSnapIn will load snapin to PowerShell console.


Manually loading Veeam PSSnapin

Veeam PowerShell Snapin contain 454 command which we can list by using Get-VBRCommand, we can manage all aspect of Veeam Backup Server.

As my Lab Veeam Backup server is freshly setup Repository, connect to vCenter server and create first job. First command we need to run is Connect-VBRServer -Server Labveeam01


Connecting to Veeam Backup Server

Next we need to add backup repository to store our backup files Add-VBRBackupRepository -Folder FolderPath -Description description -Type WinLocal will create local repository in this case on Veeam Backup server local drive


Creating Backup Repo

We can perform Set operation on our repository like for example change a name to something more friendly


Changing repository name

And we can remove repository by running Remove-VBRBackupRepository


Removing repository

Next step will be to add our backup source, in my lab I will use vCenter. Before we add source we have to add credential to be able manage vCenter server. Running command Add-VBRCredential and specifying name, password and description we will add existing user form vCenter Server


Commands to manage credential on Veeam Server


List of default credentials


Adding new credential for vCenter Server


Removing credential


Now we can add vCenter server to Veeam Backup Server. Veeam PSSnapin include two command to work with vCenter Add and Set, we will use Add-VBRvCenter. We need to specify host name and credentials created in previous step which I have store in variable $VCCred by running command Get-VBRCredentials


vCenter commands


Adding vCenter server


Nex post we will create backup job.