r/vmware • • Dec 27 '19

Me after successfully running a PowerShell script against our ESXi host

Post image
465 Upvotes

14 comments sorted by

32

u/[deleted] Dec 27 '19

My dude you have encapsulated the feeling.

Now start branching out to multi-host/vcenter/multi-function scripts or making commandlets and ATTAIN THE POWER OF THE GODS

46

u/yickickit Dec 27 '19

Or misplace a parenthesis and attain the power of unemployment!

18

u/[deleted] Dec 27 '19

-whatif

The JobSaver(tm)

9

u/bd_614 Dec 28 '19

-confirm:$false is more fun

4

u/[deleted] Dec 28 '19

Only the upper echelons of intellectualism run freshly written code with confirm:$false

I see you're a man of class

5

u/fbm1003 Dec 28 '19

This is the not-so-secret sauce

12

u/daarmstrong Dec 28 '19

I wrote a script to update my vmware hosts from a windows server in powershell. After completing all my code I realized that all my windows servers were virtual servers. I couldn't shutdown all vms and reboot. I ended up rewriting the connection piece in bash on a monitor server I have running.

5

u/pastorhack Dec 29 '19

powercli will run on linux, and cron works way better than windows task scheduler

6

u/Clydesdale_Tri Dec 27 '19

Check out the as-built report for your next piece! Tim Carmen wrote it with the help of the community.

I wrote a step by step awhile back on my blog. Https://hecktechs.com

3

u/daemon7 Dec 28 '19

Thanks for the reminder. I loved this report. I haven’t used it since 2018 so assume it’s gotten better. Sounds like Monday morning fun for me.

3

u/rhys-hammond32 Dec 29 '19

thanks for the great write-up, saved for the next customer review I need to do.

4

u/derpjutsu Dec 28 '19

Wait till you do your first, foreach($host in $hosts){stuff to do} script across a bunch. You'll need one of those red glowing eye memes. :D

2

u/akamrbungle Dec 28 '19

Vcheck, that is the ducks nuts.

2

u/strikethrough- Dec 27 '19

I like this one!