This article describes a means by which vCommander administrators can generate quota reporting for organizations, via the REST API. 


This solution can be run on an ad-hoc basis, but the procedure below describes scheduling it to run on a daily basis using Windows Task Scheduler. The output file is generated with a date appended to the file name.


Preparing the Script

  1. Download the script and extract to a location on the vCommander server. In this example, we use c:\scripts\quota\.
  2. Edit the file c:\scripts\quota\export_org_usage.ps1 as follows:

    on line 10, enter the fully qualified domain name or IP address between the quotes.
    on line 11, enter the full path to your encrypted credentials file between the quotes
    on line 12, enter the full path to the directory where the output file should be created.

  3. Save the file.


Creating the Scheduled Task

  1. Login to the vCommander application server as a Windows administrator and launch Task Scheduler.
  2. In the Actions pane, click Create Basic Task.
  3. Provide a Name and Description. Click Next.


  4. Choose the Trigger. Click Next.


  5. Set additional scheduling options.


  6. Choose Start a program as your action. Click Next.


  7. Configure the next page as follows, then click Next:

    Program/script: Click Browse...  to locate the PowerShell executable.
    Add arguments: &  'c:\scripts\quota\export_org_usage.ps1'


  8. Click Finish.

The csv file will be created on the schedule you set in the location you specified each day following, until the schedule is changed.