Powershell Show Me How for Veeam

Introducing a small new Powershell tool that will show you how to code Powershell with the Veeam PSSnapIn. It actually uses the SnapIn to generate dynamic code. For example in the screenshot below, you will see that the tool has extracted the options from a Job.
Hence you must run the tool on a Veeam Server to get the best results. Notice that the code is 0.04 and I only tested it on one server so watch out running it on any production server.

That being set, you can actually extend the tool by creating additional XML code in the scriptmap.xml. The scriptmap follows a simple structures

  • A Class is just to define a class or collection of objects you want to work on
  • Class command is the command used to fetch the Powershell objects
  • Listvalue is the value that will be called on the object to get the name in Item box. If you don't give this parameter the script will actually use toString() method on the Object you are listing
  • Listtype is just a unique value that will be used together with listvalue to fill up the "Select your Veeam Item". Notice that it is also used to get the dynamic scripts
  • Script and Scriptname, speak for themselves I guess
  • CDATA is used to put in the code. If you want to use dynamic code enclose it between "##". The object you will be working in will be stored in $selObject.
That being said, you can get version 0.04 here .

The script is not signed so you might have to put your executionpolicy on remotelysigned and unblock the file.

Setting the correct executionpolicy can be done by executing as an administrator "set-executionpolicy remotesigned".

Unblocking the file can be done via the properties of the ps1 file.
You can read more  about this here

No comments:

Post a Comment