Last week I was given a little one line batch file that will backup every running VM on VC. This is it here:
for /f “tokens=2 delims=:” %%i in (‘vcbvmname -h virtualcenter.rtfm-ed.co.uk -u administrator -p password -s Powerstate:on ^| find “name:”‘) do @rd /s /q “D:\Backups\All\%%i” &vcbmounter -h virtualcenter.rtfm-ed.co.uk -u administrator -p password -a name:”%%i” -r “D:\Backups\All\%%i” -t fullvm > “D:\Backups\All\%%i.log”
Use the vcbvmname command to search for just the VMs that currently powered on. It then pipes that information to the vcbMounter command to start a FullVM style backup. The progress of each backup is recorded in the LOG files for each VM.
Pretty neat for a 1-line batch file.