VMware Cloud Community
as900w
Hot Shot
Hot Shot
Jump to solution

How shut down a group of VMs use Schedule task

Server Room once a year power maintenance.

Need shut down all server。

How shut down a group of VMs use Schedule task.

Then Shut down ESXi host?

1 Solution

Accepted Solutions
UmeshAhuja
Commander
Commander
Jump to solution

Hi,

Use this below blog for shutting down multiple VM. Good Information and explanation provided 

Using PowerShell to Gracefully Shut Down Multiple Virtual Machines in VMware | Pipe2Text.com

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.

View solution in original post

10 Replies
btesrail
Contributor
Contributor
Jump to solution

Use bash shell to create the script.

But it is not the good practice, usually before any power maintenance, configuration backup is necessary before any shutdown. Or else, we may face server unable to up.

0 Kudos
MBreidenbach0
Hot Shot
Hot Shot
Jump to solution

In my lab environment I'm using PowerCLI scripts to start/stop the lab (power on ESXi hosts via HPE iLO powershell cmdlets, wait until ESXi pings, wait until I can connect-viserver, exit maintenance mode, start VMs in several stages; start VMs of stage, wait until VMware Tools status for all stage VMs is OK or OLD, do next stage until done. Shutdown almost the same procedure only inverse order and no iLO commands needed)

0 Kudos
as900w
Hot Shot
Hot Shot
Jump to solution

How to configuration backup?

0 Kudos
admin
Immortal
Immortal
Jump to solution

   

Have you seen this article and is it applicable to your situation- http://www.itingredients.com/vmware-scheduled-task-power-off-power-virtual-machine/

If you found my answers useful please consider marking them as Correct OR Helpful

Regards,

Randhir

0 Kudos
admin
Immortal
Immortal
Jump to solution

if you have third party backup tool like netbackup , TSM  etc. you can take full backup  from their before going to shutdown.

Regards,

Randhir

0 Kudos
UmeshAhuja
Commander
Commander
Jump to solution

Hi,

Use this below blog for shutting down multiple VM. Good Information and explanation provided 

Using PowerShell to Gracefully Shut Down Multiple Virtual Machines in VMware | Pipe2Text.com

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
as900w
Hot Shot
Hot Shot
Jump to solution

I want to shut down a group of VMs, don't a VM.

0 Kudos
as900w
Hot Shot
Hot Shot
Jump to solution

It's OK. Thanks

0 Kudos
admin
Immortal
Immortal
Jump to solution

Easy and Effective solution in PowerCLI to Shutdown VMs with one click:

First LOGON into the vCenter from locally/remotely PowerCLI

Connect-VIServer -server YouvCenterServerName

PASTE,

get-content c:\cli\vm.txt | foreach-object { shutdown-vmguest $_ }

Press ENTER > DONE!

EXAMPLE:

C: Is your local C:\ Drive

CLI: You need to create a folder in the C: Drive & name it "cli" or anything you want

VM.TXT: then create a txt file & input all the VM names in it. EX:

VM01

VM02

Vm03

Regards,

Randhir

as900w
Hot Shot
Hot Shot
Jump to solution

Thanks

0 Kudos