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


0Rt1j8CoLEscqp1tMyqQb2LgoAIcM8xBKQ.png


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.


Requirements



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.


_Tl3rRVgqYpol4LwWdmffqDrMNyxWkg7cA.png



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.

    B4CqBqCgbum2tirLAaOas_CllV0B2wYGLg.png


  4. Choose the Trigger. Click Next.

    jvkPCTRledPVXz3Iu_hXSgYDxaxTC6y0BA.png


  5. Set additional scheduling options.

    UfSwNnIkQ4krGgZ5qKVpeh4un45oxwG3ig.png


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

    Czgk-AG_Rc-_zRM6QFTGf7-2LaNSMitE_g.png


  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'

    cvHzQ7sOixm_gLf9vI7EEkiArtdL-cXClQ.png


  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.