A PowerShell script performing all these operations has been prepared. This script produces a report showing the data transfers over a period of time broken down by day, agent, max, mi, average etc
Please note that this script needs Powershell 3.0 or later and a core running AppAssure 5.4.x
The amount of data contained in (successful) transfer is of great importance for sizing a backup environment. As such a report is necessary.
The script exposes parameters that allow changing the default location and the name of the generated report which is saved in the Downloads folder of the currently logged user and it consists of the local machine name plus a guid. It is recommended to change the location and the name if the report is to be run on a regular basis as a scheduled task as new reports with the same name overwrite the old one.
1 The Report is generated from a local workstation – does not need to be run from a core
2 The Report may run for multiple cores at the same time
3 Passwords are encoded (for instance Abc_1234 needs to be entered as QQBiAGMAXwAxADIAMwA0AA==) to keep sensitive data away from prying eyes. Since real encryption would be machine specific or need a key, a password encrypted on one machine won’t work on other machine and it is possible that the same script is to be run from multiple workstations, the encoding solution was chosen for portability and for reducing the administrative effort.
4 When sent over the wire, the passwords are sent as secure strings in credential objects. Remote cores are contacted via https: but certificates are not enforced.
5 The cores to be queried for the reports can be entered either at the command line (i.e. –corenames W2012-0,W2012-1,W2012-2) or in a csv file (corename,username,password); only the corename field is mandatory. If username and password are missing, no comas are needed.
6 If the cores to be queried are located in a file and they all have the same credentials (username and password), the credentials can be specified in the command line only and applied to all cores.
7 If some of the cores in the core input file have different credentials than the default ones which are specified in the command line, then their username and password need to be specified in the file. Example:
8 Some of the cores reports may yield fewer results than expected or even no results. This may be caused by:
a the core service is not running
b the mongod service is not running
c the core server is inaccessible
d Repositories are inaccessible due to some internal issues
e The events on the core are inaccessible
These causes are tested only if the report for the core does not contain all expected data. This was done to speed up overall execution of the script. The report with the causes of failure are attached to each core in place of the normal report.
9. The input file can be created using the –createcorefile parameter which brings up notepad with the file header (corename,username,password). This was done to avoid misspelling the header information.
10. The encoding of passwords can be done using the –encodepassword parameter which allows entering a password in clear text and getting it back in encoded format. The encoded password is automatically copied to the clipboard for easy manipulation.
Again, this helps keeping passwords away from prying eyes.
11. The reports can be sent via e-mail.
To configure e-mail please run the script with the -setupemail parameter.
You will be presented with a dialog alowing e-mail configuration. The presented parameters are sufficient for using any standard e-mail server.
For convenience the SMTP serverport and SSL settings are already set up for a GMail account (you need to provide your gmail credentials and the address where the e-mail containing the report needs to be forwarded to).
12. When preparing a report, if desired, it is possible to drop one or more columns in the summary section of the report. For instance if virtual standbys are not enabled on any of the queried cores, it can be removed using the –noexport parameter.
by default an unique name is generated every time a new report is created. userprofile\Downloads\<local_computername_newguid>.html
Please note that even if specifically mentioned, the file name of the report receives a trailing date in the name. If the folder containing the report does not exist, it is created.
generates the report for the number of desired days. The default value is 7 days.
Used for comparaison purposes. it calculates the values midnight to midnight.
Allows generating the report only for the protected agents of interest
mandatory -- the name of the core(s) to run the report on or the path to file containing cores information
the username for the credentials to be used. if missing a dialogbox will pop up
the password for the credentials to be used. it MUST be encoded using the encoding function of the script. if missing a dialogbox will pop up
sends the report via e-mail using the e-mail configuration section at the end of the script (needs to be configured running the script with the -setupemail parameter) instead of opening it on the local machine. The report may be sent, by default, via gmail but the values may be changed to match a different e-mail server.
allows encoding a clear text password. all passwords MUST be encoded. this parameter is exclusive to any other parameters.
configures the e-mail settings in the script
.Examples of use
.\TransferVolumeReport.2.html.ps1 -days 5 -fulldays -mail -corenames c:\temp\mycores.csv
.\TransferVolumeReport.2.html.ps1 -fulldays -mail -reportpath c:\temp\report.html
.\TransferVolumeReport.2.html.ps11 -encodedpassword myPa$$w0rd
.\TransferVolumeReport.2.html.ps1 -corenames Core2012r2-0,Core2012r2-1 -username .\administrator -password cgAzAHMAdAByAGkAYwB0ADMAZAAhACEAR -reportpath c:\myfolder\myfile.html
.\TransferVolumeReport.2.html.ps1 -corenames c:\temp\mycores.csv -username .\administrator -password cgAzAHMAdAByAGkAYwB0ADMAZAAhACEAR
The script for generating the report and a simple example are attached to the KB.