Automation
Conceptual illustration: a virtual server cluster flowing into a blue spreadsheet grid, an automation gear and clock representing scheduled inventory export.

Automate RVTools Exports with PowerShell and Task Scheduler

RVTools 4.x workflow reviewed against Dellโ€™s current documentation. Confirm the installed releaseโ€™s executable path, authentication and switches before scheduling.

RVTools can export vSphere inventory without an interactive GUI session, making it useful for recurring capacity and configuration reports. A reliable job needs more than a working export command: it also needs controlled credentials, current certificates, fresh output and an observable result.

Install from the authorized source and check the version

Use Dellโ€™s RVTools download page and its published checksum and release documentation. Do not use a lookalike download site or an old unverified installer. The installation directory can differ between older Robware and newer Dell releases; set it explicitly in the job.

Recent RVTools releases validate TLS certificates by default. Fix an expired, mismatched or untrusted vCenter certificate rather than adding a certificate-bypass flag to every scheduled job.

Run and verify one export interactively

Where your vCenter authentication configuration supports Windows pass-through authentication, this pattern avoids placing a password in the command line. Run it under the same dedicated identity that will own the scheduled task:

$ErrorActionPreference = 'Stop'
$rvtools = 'C:\Program Files (x86)\Dell\RVTools\RVTools.exe'
$output = 'C:\Reports\RVTools'
$server = 'vcenter01.example.com'
$file = 'vcenter01-' + (Get-Date -Format 'yyyyMMdd-HHmmss') + '.xlsx'

if (-not (Test-Path -LiteralPath $rvtools)) { throw 'Check the RVTools install path.' }
New-Item -ItemType Directory -Path $output -Force | Out-Null
& $rvtools -passthroughAuth -s $server -c ExportAll2xlsx -d $output -f $file
if ($LASTEXITCODE -ne 0) { throw "RVTools exited with $LASTEXITCODE" }
$report = Get-Item -LiteralPath (Join-Path $output $file) -ErrorAction Stop
if ($report.Length -eq 0) { throw 'The export is empty.' }
$report | Select-Object Name, Length, LastWriteTime

Replace the illustrative server and path. Check the generated workbook and its expected tabs, not just whether an executable launched. Use the accountโ€™s least required vSphere permissions, and protect exported infrastructure data with appropriate file/share ACLs and retention.

Handle explicit credentials carefully

If pass-through authentication is not available, use the mechanism documented for the installed version. RVTools 4.5 and later replaced the old password-encryption executable with RVToolsPasswordEncryption.ps1. Follow the current manual and regenerate stored values when required. An encrypted command-line value is still a credential artifact that must be protected; it is not safe to publish in a script or screenshot.

Schedule the validated script

In Task Scheduler, set an explicit PowerShell executable, a fully qualified script path and a working directory. Use a dedicated task identity, prevent overlapping runs and review its network/share access. Use UNC paths rather than assuming an interactive userโ€™s mapped drive exists. Follow the organizationโ€™s script-signing policy instead of disabling it globally.

Test the task on demand while logged off from the task identity where applicable. Confirm a new, nonempty workbook and check Last Run Result and job logs. Alert on a failed job or a report older than its expected interval; a yesterdayโ€™s file must not be accepted as todayโ€™s success.

Merge exports from multiple vCenters

& 'C:\Program Files (x86)\Dell\RVTools\RVToolsMergeExcelFiles.exe' `
  -input 'C:\Reports\RVTools\vc01.xlsx;C:\Reports\RVTools\vc02.xlsx' `
  -output 'C:\Reports\RVTools\combined.xlsx' -overwrite -verbose
if ($LASTEXITCODE -ne 0) { throw 'RVTools workbook merge failed.' }

Verify that every input is fresh before merging. The first workbook or supplied template determines which worksheets and columns lead the merge, so use a consistent export schema. Keep unmerged originals until validation succeeds. For distribution, use an approved secure file location or messaging integration; avoid assuming the historical SMTP helper is suitable for modern authenticated mail.

References

7 thoughts on “Automate RVTools Exports with PowerShell and Task Scheduler”

    • Author gravatar

      I like to Automating RVTools with Scripts and Scheduled Tasks

      and I try to run (rvtools -u Administrator -p password -s 192.168.2.220 -c ExportvInfo2xlsx -d C:\Temp -f vInfo.xlsx -ExcludeTags) with user name and password and it shows an error (RVTools : The term ‘RVTools’ is not recognized as the name of a cmdlet)
      can you please share the working script

    • Author gravatar

      Yes mandatory to be in the directory where rvtools.exe is otherwise you’ll get .dll linking problems.

    • Author gravatar

      I am executing this command from the RVtool directory.
      RVTools.exe -s pcc-37-59-190-218.ovh.com -u username -p password -c ExportvInfo2csv -d “C:\temp” -f “ExportvInfo2csv.csv”
      The command gets executed but is not generating any output.
      CAn you pls assist.

    • Author gravatar

      Great article!
      Note there is a new version released today with some cool new features, and the documentation includes some changes to the steps above, in particular how to automate/schedule collection with RVTools.

Leave a Reply

Your email address will not be published. Required fields are marked *