vcenter

ian's picture

Clone multiple virtual machines to a different datastore as a backup

Scenario

Clone multiple virtual machines to a different datastore as a backup.

All of my virtual servers, and ONLY virtual servers in a specific folder in vcenter, needed to be cloned to a backup datastore weekly, so I wrote a powershell script to clone them. I then added a Scheduled Task on my vCenter server to execute the script on Saturday evening.

https://github.com/willisiw/ShellScripts/blob/master/vm-bulk-clone.ps1

ian's picture

Reboot Virtual Machines by name wildcard

Scenario

Reboot multiple Virtual Machines on a single vCenter server based on a name with a wildcard.

All of my Virtual Desktops, and ONLY virtual desktops are prefixed by the characters vm- or vm7-, so I wrote a powershell script to reboot these. I then added a Scheduled Task on my vCenter server to execute the script.

https://github.com/willisiw/ShellScripts/blob/master/reboot-vm-bulk.ps1