You can use the Copy-DatastoreItem cmdlet for this.
In KB2001041 you'll find some examples.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can you expand on what you mean with "backup" ?
Do you want to make a copy/export of the VM files ?
Do you have a backup tool and and an a backup agent ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
If you understand by this a real backup then i guess then there is no cmdlet for that Depends how you would understand 'backup' . If you would really want it bad then i guess you could create a script that might be acting like a backup script more or less. IMHO i would use proper backup software to backup vms. If you don't have much budget for it there are some solutions like vcbghetto.
ya.I want to make a copy of all vm files.how can i do that?
It would be better, if i get to know any commands rather than script to perform this action.
You can use the Copy-DatastoreItem cmdlet for this.
In KB2001041 you'll find some examples.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for your help