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.
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.
Running Add-PSSnapin VeeamPSSnapIn will load snapin to PowerShell console.
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
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
We can perform Set operation on our repository like for example change a name to something more friendly
And we can remove repository by running Remove-VBRBackupRepository
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
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
Nex post we will create backup job.