PowerShell script exchange
Post Reply
tdewin
Veeam Software
Posts: 1818
Liked: 655 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Show Me How

Post by tdewin »

Introducing a small new Powershell script 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.
2013-03-05_20-12-55.png
2013-03-05_20-12-55.png (19.73 KiB) Viewed 1245 times
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
2013-03-05_21-02-16.png
2013-03-05_21-02-16.png (9.74 KiB) Viewed 1245 times
You can download version 0.04 http://dewin.me/psmh-0.04.zip

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.
2013-03-05_21-27-34.png
2013-03-05_21-27-34.png (40.02 KiB) Viewed 1245 times
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests