-------------------------------------------
Original Message:
Sent: Oct 01, 2025 03:56 PM
From: Arnaud Dexant
Subject: RVTOOLS Automation
Hi,
i'm looking to automate Rvtools export and tried to run a script as task scheduled, but seems Rvtools needs GUI, so it can't be run like "whether user is logged or not"
is your script running like that? or only when user is logged?
Original Message:
Sent: Apr 03, 2025 06:31 PM
From: Christian Moore
Subject: RVTOOLS Automation
This is my script, after I got it all working I setup a scheduled task to run it every week.
If passing through firewall with NATed IP's in place add port 443 and port 902
____________________________________________
# Save current directory
$SaveCurrentDir = (get-location).Path
# Set RVTools path
[string] $RVToolsPath = "C:\Program Files (x86)\Dell\RVTools"
# cd to RVTools directory
set-location $RVToolsPath
# -----------------------------------------------------
# Set parameters for vCenter 1 and start RVTools export
# -----------------------------------------------------
[string] $VCServer = "192.168.223.26" # my test vCenter server
[string] $User = "vc_service_account"
# use -passthroughAuth or an encrypted password. You can encrypt your password with the provided PowerShell script RVToolsPasswordEncryption.ps1
[string] $EncryptedPassword = "%encrypted password%"
[string] $XlsxDir1 = "C:\RVTools"
[string] $XlsxFile1 = "tmvnc01.xlsx"
# Start cli of RVTools
Write-Host "Start export for vCenter $VCServer" -ForegroundColor DarkYellow
$Arguments = "-u $User -p $EncryptedPassword -s $VCServer -c ExportAll2xlsx -d $XlsxDir1 -f $XlsxFile1"
Write-Host $Arguments
$Process = Start-Process -FilePath ".\RVTools.exe" -ArgumentList $Arguments -NoNewWindow -Wait -PassThru
if($Process.ExitCode -eq -1)
{
Write-Host "Error: Export failed! RVTools returned exitcode -1, probably a connection error! Script is stopped" -ForegroundColor Red
exit 1
}
# ---------------------
# Mail output xlsx file
# ---------------------
# Define variables
$FromAddress = "%smtprelayserver%"
$ToAddress = "%email address to send to%"
$Subject = "RVTools TMvnc01 export for all vCenter Servers"
$Body = "Attached is an export of all VM Servers and their corresponding usage of CPU, Memory and Hard Disk space"
$AttachmentPath = "C:\RVTools\tmvnc01.xlsx" # Replace with the actual file path
# Send the email
Send-MailMessage -From $FromAddress -To $ToAddress -Subject $Subject -Body $Body -Attachment $AttachmentPath -SmtpServer %smtprelayserver% -Port 25 -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "%smtprelayserver%", (ConvertTo-SecureString -String "DroopyWARM69water##" -AsPlainText -Force))
# Back to starting dir
Set-Location $SaveCurrentDir
Original Message:
Sent: Sep 05, 2024 05:31 AM
From: IFSC SYSAD GIFT CITY
Subject: RVTOOLS Automation
Please find below:-
# Save current directory
$SaveCurrentDir = (get-location).Path
# Set RVTools path
[string] $RVToolsPath = "C:\Program Files (x86)\Dell\RVTools"
# cd to RVTools directory
set-location $RVToolsPath
# -----------------------------------------------------
# Set parameters for vCenter 1 and start RVTools export
# -----------------------------------------------------
[string] $VCServer = "10.200.242.175" # my test vCenter server
[string] $User = "vsphere.local\administrator"
[string] $XlsxDir1 = "C:\Users\admin\Desktop\New folder"
[string] $XlsxFile1 = "vCenter1.xlsx"
# Start cli of RVTools
Write-Host "Start export for vCenter $VCServer" -ForegroundColor DarkYellow
$Arguments = "-u $User -p /***/ -s $VCServer -c ExportAll2xlsx -d $XlsxDir1 -f $XlsxFile1"
Write-Host $Arguments
$Process = Start-Process -FilePath ".\RVTools.exe" -ArgumentList $Arguments -NoNewWindow -Wait -PassThru
if($Process.ExitCode -eq -1)
{
Write-Host "Error: Export failed! RVTools returned exitcode -1, probably a connection error! Script is stopped" -ForegroundColor Red
exit 1
}
$OutputFile = "C:\Users\admin\Desktop\New folder\vCenter1.xlsx"
# Back to starting dir
Set-Location $SaveCurrentDir
Original Message:
Sent: Sep 05, 2024 04:41 AM
From: LucD
Subject: RVTOOLS Automation
Without seeing any code it is difficult to analyse your issue.
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Original Message:
Sent: Sep 05, 2024 02:43 AM
From: IFSC SYSAD GIFT CITY
Subject: RVTOOLS Automation
Hi,
I ran the script and getting the following error: -
Error: Export failed! RVTools returned exitcode -1, probably a connection error! Script is stopped
Though connectivity from the server to the vcenter is working ok..
Can u pls let me know what I am missing...
Original Message:
Sent: May 11, 2017 04:37 AM
From: LucD
Subject: RVTOOLS Automation
Have a look at 1. Re: Invoke multiple vcenters from rvtoolsbatch