Avatar of heze54
heze54
Flag for Spain asked on

Built a vMware script to switch off and on a vCenter

Hi,

I´ve a vCenter with up to 1XX Vmachines listed by templates. All of them (windows, ubuntu,redhat..) have vTools installed 5.1 U2.

I need a script to switch off and after thar, switch on all of them by template

For Example:

template1
template2
..
..
..

How to do this? I don´t have enough knowedge to build a powercli script

any idea?

Regards
VMwareVirtualization

Avatar of undefined
Last Comment
heze54

8/22/2022 - Mon
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Templates cannot be powered on, so what do you want to do with the templates?
heze54

ASKER
Hi,

Sorry I meant folders no templates
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

You want to switch on ALL VMs by Folder?

These are Virtual Machines, not templates, as templates cannot be powered on, only deployed and /or  to VMs.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
heze54

ASKER
Hi,

Forget my mistake(templates) Iwas talking about folders and inside them, VM running.

Yes, by folder or/and export the whole enviroment (Vmachines) to a cvs file.. for example and then, reorder the file and run the operation
ASKER CERTIFIED SOLUTION
Raheman M. Abdul

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
heze54

ASKER
Hi,

I exported the csv  and , how to run a for to eof switching off all machines listed on a csv file?
heze54

ASKER
Nice comment for me.

Right post
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.