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 the backup server. PowerShell snapin will be installed by default, we don’t need to select anything during installation, Veeam requires 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 the 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 contains 454 commands 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 the vCenter server and create the first job. The 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 a credential to be able to manage the 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 includes two commands to work with vCenter Add and Set, we will use Add-VBRvCenter. We need to specify hostname and credentials created in the previous step which I have stored in variable $VCCred by running command Get-VBRCredentials

vCenter commands

Adding vCenter server
Nex post we will create a backup job.