Hi,
We would like to schedule the following vicfg-cfgbackup task for ESXi Host on the vCenter Server running on a physcial Windows Server. We are currently using vCLI 5.
C:\Program Files (x86)\VMware\VMware vSphere CLI>vicfg-cfgbackup.pl --server ESXi5 --username root --password Mypassword -s D:\ProgramData\VMware\Configuration\ESXi5.bak
In Windows Task Schedular, we have tried the following ways but still not successful
1) Start a Program, Program - "C:\Program Files (x86)\VMware\VMware vSphere CLI>", parameter - "vicfg-cfgbackup.pl --server ESXi5 --username root --password Mypassword -s D:\ProgramData\VMware\Configuration\ESXi5.bak"
2) Start a Program, Program - "C:\Program Files (x86)\VMware\VMware vSphere CLI>vicfg-cfgbackup.pl", parameter - "--server ESXi5 --username root --password Mypassword -s D:\ProgramData\VMware\Configuration\ESXi5.bak"
Your advice is sought.
Thanks
I've added "C:\Program Files\VMware\VMware vSphere CLI\bin>" to my system "PATH" so I can luch vCLI command from anywhere.
Made a batch file and write bellow lines there:
vicfg-cfgbackup.pl --server SRV1 --username root --password MyP@ss -s "e:\host-cfg\SRV1.cfg"
vicfg-cfgbackup.pl --server SRV2 --username root --password MyP@ss -s "e:\host-cfg\SRV2.cfg"
Then created a basic schedule on my windows, select "Run Program" in "Action" step and get the path of created batch file in next step.
If you want to run it multiple times a day, you can edit the created schedule like attached image (based on your backup timing).
try to create following cmd file
<full path to perl>\perl <full path to vicfg-cfgbackup>\vicfg-cfgbackup.pl --server ESXi5 --username root --password Mypassword -s D:\ProgramData\VMware\Configuration\ESXi5.bak
and add this cmd file to task sheduler
I've added "C:\Program Files\VMware\VMware vSphere CLI\bin>" to my system "PATH" so I can luch vCLI command from anywhere.
Made a batch file and write bellow lines there:
vicfg-cfgbackup.pl --server SRV1 --username root --password MyP@ss -s "e:\host-cfg\SRV1.cfg"
vicfg-cfgbackup.pl --server SRV2 --username root --password MyP@ss -s "e:\host-cfg\SRV2.cfg"
Then created a basic schedule on my windows, select "Run Program" in "Action" step and get the path of created batch file in next step.
If you want to run it multiple times a day, you can edit the created schedule like attached image (based on your backup timing).