Seems to work for me.
The only explanation I can think of is that the password is not correct.
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