vTesseract











My name is Josh Atwell and I've been working in the IT industry exclusively since 2004. I've received my VCAP-DCD, VCAP-DCA, VCP3,4 certifications. I am currently working as a vArchitect for VCE where I am helping customers with many things that start with 'V'.

vTesseract is my personal presence for my thoughts, musings, and technical write-ups involving PowerShell, datacenter virtualization and other technologies I come across daily. The opinions and thoughts on this site are my own and are not endorsed or affiliated by my employer or anyone else. This is done on my own free time and all work is limited based on my time and available resources. Your comments, thoughts, opinions are welcome. Thanks for reading!

Current Resume-CV

Mon Sep 26

Resources for Getting Started with #PowerCLI Automation

Books - Training

I highly recommend the new PowerCLI book. http://www.powerclibook.com/  It is not really “light” reading but they do a great job of demonstrating common uses of PowerCLI.  They also have all of the scripts available for download at:

http://spa.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797,navId-290600,pageCd-resources.html

I’m a big fan of Hal Rottenberg’s book for getting started with PowerCLI.  Hal provides a great PowerShell primer at the beginning and then flows you through ways you can use PowerCLI in your environment.  I learn something new each time I pick it up (which means I clearly didn’t read it thoroughly enough)

 http://www.amazon.com/gp/product/0982131402?ie=UTF8&tag=techprosaic-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0982131402

I have also checked out Hal’s PowerCLI training from TrainSignal.  Again, great overview and some deepdive as to what is possible with PowerCLI.  Haven’t completed this yet but what I’ve seen so far is excellent.

http://www.trainsignal.com/VMware-vSphere-PowerCLI-Training.aspx

I have recently received a link from PowerShell.org that provides some free PowerShell eBooks.  Check them out at:

http://powershell.org/books/

If you have training dollars you can also take advantage VMware’s PowerCLI training offering.  Automatiom with vSphere PowerCLI [v4.x]

http://mylearn.vmware.com/mgrreg/courses.cfm?ui=www_edu&a=one&id_subject=19082

Also make sure you check out the PowerCLI Poster.  It includes an organized listing of the cmdlets as well as tons of other PowerCLI references and resources.  I’m a geek so I peek around at it from time to time to see if there is a cmdlet I haven’t used before and get some information on it.  This is how you learn.

Community

One of the most valuable locations for information is with the PowerCLI community forums on VMware’s website.  The folks there are very helpful if you get stuck on something or need some guidance.  Make sure you ask questions and award points for correct answers or assistance.  It’s not really cool to expect folks to write the script for you so try to go in with at least a start.  Often you’ll find that you get a response pretty quick on most things.  You’ll get accustomed to seeing LucD’s name on there regularly.  I have met him and confirmed he is not a robot, just an extremely talented and capable individual.

http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/powercli

Pro Tip: If you are working in the PowerShell console and want to jump on the community site quickly simply use the cmdlet Get-PowerCLICommunity

There are some serious experts out there that are great people to follow.  I personally try to contribute as much as I can on http://www.vtesseract.com but here’s a list of folks you need to keep your eyes on. (Alphabetical order because I really can’t prioritize them.

 Here’s a twitter feed that I have created with solid PowerShell/PowerCLI folks.

https://twitter.com/#!/Josh_Atwell/powercli-powershell

Also check out some of the PowerShell podcasts out there.  They regularly mention PowerCLI and their hosts and guests usually rock!

Writing the Code

I use PowerGUI most of the time and I highly recommend you get the VMware community PowerPack installed from http://powergui.org/entry.jspa?externalID=2551&categoryID=290 .  It has a ton of prebuilt functions for getting environment info.  I prefer PowerGUI because of the PowerPacks but  I’ve used other editors such as PrimalScript and PowerWF’s PowerSE.

http://powerwf.com/products/powerse.aspx

PowerWF is a pretty rocking product if you’re wanting to create some workflows with PowerShell and their PowerSE product is a good script editor.

While you’re learning you can also use Onyx to capture commands from vCenter server tasks and learn how calls are made.  You may want to wait until you’ve written a few scripts before going down that road but it can tell you how to perform vCenter tasks with PowerCLI. http://labs.vmware.com/flings/onyx

While I don’t have an editor on my iPad or iPhone (app wish list, hint hint Quest and Sapien) I do have Sapien’s iPowerShell and I use it regularly as reference, primarily when working on a blog post remotely or idle time in the car to learn more about different cmdlets.  Again, this is what you have to do to learn.  Yes I am a PowerShell dork.  http://www.sapien.com/blog/2009/03/03/ipowershell-brings-powershell-help-to-iphone/

Windows Server 8 is introducing PowerShell v3 which is supposed to include a web access.  Hoping this will include ability to load PowerCLI snapin.

http://blog.powershell.no/2011/09/14/windows-powershell-web-access/

Orchestrator

Orchestrator is really good for automating process and workflow.  For instance.  Let’s say that you get a request for a VM, you could conceivably have Orchestrator kick off creating a datastore, connecting it to vSphere, firing off the creation process, email requester, etc.  I’m still trying to learn how it fits into a regular environment myself.   This is a lacking on my part and not the Orchestrator team.  What they are doing is enabling and  I am confident  it will be key for process automation as “cloud” becomes more relevant to organizations.  The hardest part is identifying your regular workflows and then getting in there to create an automated process.  There are other products out there that assist in workflow automation such as PowerWF and Tidal.

I am in regular contact with the author of the vCO book, Cody Bunch, and was able to meet him at VMworld.  He provided me a couple of links that he said had valuable reads.  I’ve included them below.

Conclusion

There is a great deal of material provided in this post and if you’re getting started it can seem quite daunting.  The best thing you can do is to simply start thinking about what you need to automate and start scripting away.  The more you do the more things will make sense when you go back to review previous books or training materials.  Please share valuable resources that you’ve used and I can update the post accordingly.

Other good links:

blog comments powered by Disqus