
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.
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
are you running your command from the “c:\program files (x86)\robware\rvtools” directory?
you’ve to run rvtools.exe not rvtools
Yes mandatory to be in the directory where rvtools.exe is otherwise you’ll get .dll linking problems.
This was fixed in the latest version ๐
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.
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.