VMware Cloud Community
AutomationStat1
Contributor
Contributor
Jump to solution

Get all VMs that automatically start with Host

Script to get all VMs that automatically start with a host and remove the automatic startup functionality. Im not even sure how to start this. I imagine to find all VMs that start with a host, it would be something like this:

Foreach($VM in Get-VM) | Select-Object Name, AutomaticStartAction

But the above doesn't populate the AutomaticStartAction column. And I don’t know the command to remove the AutomaticStart Action

Any help would be appreciated Smiley Happy

Reply
0 Kudos
25 Replies
LucD
Leadership
Leadership
Jump to solution

Then there seems to be something wrong with the Start Policy for some VMs.
You are connected to a VCSA? Or an ESXi node?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Simply1
Contributor
Contributor
Jump to solution

VCSA

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Then you will have to find the issue in your environment.
Can you reach the Start Policy of all VMs through the Web Client?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Simply1
Contributor
Contributor
Jump to solution

yes, on web i see all

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Works for me.

Check your PowerCLI installation.
If that shows no issue, I suggest you open an SR


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Simply1
Contributor
Contributor
Jump to solution

thx for the support

Reply
0 Kudos