PowerCLI - is it supposed to be this much fun?
Deathmage
Banned Posts: 2,496
Ok, so maybe I'm just a tad too much excited about all this and being that I've never scripted with Powershell before this PowerCLI stuff is pretty fun and makes my life easier....been using the content from chapter 14 in Mastering vSphere 6....
So I'm curious did anyone ever use the Edition one of VMware vSphere PowerCLI Reference? - if so would this one be a good grab, since it's Edition two, and literally just published last month?
I'm only hitting the tip of the iceberg, but PowerCLI looks like it can be useful and I'm pondering for VCIX and VCDX it will be nothing short of essential.
Thoughts...
VMware vSphere PowerCLI Reference: Automating vSphere Administration: 9781118925119: Computer Science Books @ Amazon.com
So I'm curious did anyone ever use the Edition one of VMware vSphere PowerCLI Reference? - if so would this one be a good grab, since it's Edition two, and literally just published last month?
I'm only hitting the tip of the iceberg, but PowerCLI looks like it can be useful and I'm pondering for VCIX and VCDX it will be nothing short of essential.
Thoughts...
VMware vSphere PowerCLI Reference: Automating vSphere Administration: 9781118925119: Computer Science Books @ Amazon.com
Comments
-
jibbajabba Member Posts: 4,317 ■■■■■■■■□□Funny enough, a colleague of mine is one of the authorsMy own knowledge base made public: http://open902.com
-
iBrokeIT Member Posts: 1,318 ■■■■■■■■■□Yes, yes it is suppose to be this fun. I find myself in it more and more with requests like "Get me a list of all the VMs that are X", "Ok now change all setting Y on all of those VMs"...
The VCAP/VCIX exams you'll find that time is your biggest constraint, not knowledge so you'll usually want to do what ever is the quickest way the solution. Although some questions you'll only be able to solve through the CLI or have to modify a PowerShell script.2019: GPEN | GCFE | GXPN | GICSP | CySA+
2020: GCIP | GCIA
2021: GRID | GDSA | Pentest+
2022: GMON | GDAT
2023: GREM | GSE | GCFA
WGU BS IT-NA | SANS Grad Cert: PT&EH | SANS Grad Cert: ICS Security | SANS Grad Cert: Cyber Defense Ops | SANS Grad Cert: Incident Response -
iBrokeIT Member Posts: 1,318 ■■■■■■■■■□I enable SSH and go directly into the host if I need to use the CLI (not DCUI, thats something different).
I really should setup the vMA for our production environment but I get the feeling I would be the only to use it2019: GPEN | GCFE | GXPN | GICSP | CySA+
2020: GCIP | GCIA
2021: GRID | GDSA | Pentest+
2022: GMON | GDAT
2023: GREM | GSE | GCFA
WGU BS IT-NA | SANS Grad Cert: PT&EH | SANS Grad Cert: ICS Security | SANS Grad Cert: Cyber Defense Ops | SANS Grad Cert: Incident Response -
Deathmage Banned Posts: 2,496I'm the only one that uses it in my environment and at home (but who else would at home, lol). I feel like after reading a few books at Barnes and Noble on PowerCLi that after chapter 3, most VMware administrators just cringe and run away from PowerCLI.
Maybe that's why Orchestrator hasn't caught on...
Perhaps it intimidates people. -
blargoe Member Posts: 4,174 ■■■■■■■■■□PowerCLI, and PowerShell in general, is my lifeline. Seriously. Of course, I'm coming from a Windows-centric background, but PowerCLI/PowerShell is my go to for most of my most repeated administrative tasks or requests for information.
Is it supposed to be fun? I don't know. But I probably get more satisfaction from solving yet another problem with PowerShell than most other technical aspects of my day to day.
When you combine PowerCLI with what PowerShell can already accomplish in the Windows operating system, it can really be a time saver.
vMA vs SSH/DCUI... usually in a pinch I just enable SSH on the host that I'm troubleshooting and connect a terminal. If I'm using the esxcli to pull information about multiple hosts (for information that I can't get from PowerCLI or is just easier with esxcli), then I use vMA. Now that I'm on a personal mission to pick Linux back up and have had a need to become more proficient in a bash style shell for other reasons, I will probably start to gravitate toward vMA oven over PowerShell for some things simply to give myself more exposure there.IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands... -
tbgree00 Member Posts: 553 ■■■■□□□□□□PowerCLI has streamlined multiple processes in our environment. We are lucky to have a guy that is really good with PowerShell and thus really gets PowerCLI.
As for the vMA vs ESXi Shell I prefer doing what I can through vMA. It's so much quicker to type vifptarget -s hostname than to go to the host in the client, turn on ssh, and go directly to it. That said if I have to do something that requires folder access I am more comfortable with SSH to the host itself. I don't know how to do that through the vMA.
The PowerCLI guy is trying to use our vMA but seems to only want to use the commands it can't do. It can't do linux commands on a host (he wanted to restart the services, browse a datastore, and edit a file on three different occasions) and it can't do vmkping for some reason so he couldn't troubleshoot a jumbo frames issue. It helped me do a coredump check though, otherwise I would have been doing hundreds of SSH sessions.I finally started that blog - www.thomgreene.com -
Deathmage Banned Posts: 2,496Do you guys know a good PowerCLI commands book?
Or is the one above a good one, it came in the mail, just haven't opened it yet. Been focusing on VCP6-DCV. -
kj0 Member Posts: 767I've read some of both of these.
VMware VSphere PowerCLI Reference : Jonathan Medd : 9780470890790
Learning PowerCLI : Robert van den Nieuwendijk : 9781782170167