Category Archives: Powershell

Exporting ESX/ESXi Host Information to Excel

hostinfoFor those of us who do not jump around from environment to environment often forget how lucky we are to know the details of our servers intimately. Over time you come to know what to expect and when something is just not right.

Continue reading

Advertisements

Advancing the Function

AdvFunctionRecently I had to grab some general info on a group of VMs in a particular folder within vSphere.  Typical stuff like, Guest OS, # vCPUs, RAM, Disk, etc. I looked around my scripts folder as I was sure I had written a small script to accomplish this task previously but came up empty. No problem, I’ll just whip something up I thought. Then my mind starts racing, will the script output to csv? html? Excel? Word? I could include all options (and code) and let the user choose? What parameters will I need and how will I validate them? This script was getting cumbersome already and I hadn’t even thought about the simple info I needed to query. Then it dawned on me…all I needed was the data. I decided to strip the function down to simply gathering the information I needed. If I wrote a proper advanced function, then I could just return the gathered objects down the pipeline and from there format the output as needed.

Simply put, an advanced function acts very much like a standard cmdlet.

Continue reading

Deploying multiple VMs via PowerCLI – Updated v1.2

DeployVMv1.2

I’ve gotten some great feedback from my original PowerShell/PowerCLI script to deploy multiple VMs asynchronously via a CSV file found here.  I decided a minor update was needed to employ these new ideas along with a few I had myself.

One of those ideas was to require the usage of the new PowerCLI 5.5 R2 features which allows the script to run without the need for a 32bit PowerShell console.

Changes include:

  • Cleaned up code / Minor bug fixes
  • Added CSV field descriptions to notes section
  • Removed requirement for 32bit PowerShell
  • Added requirement for PowerCLI 5.5 R2 or later
  • Added Boot parameter to determine whether or not to power on new VMs
  • Added OS Customization Spec to CSV (previously was hard coded in user variables)
  • Fixed logic for vSS vs vDS – Added parameter to CSV
  • Added ability to use DHCP instead of just static IPs
  • Renamed a few CSV fields to better describe parameter
  • Added progress bar to indicate status

Continue reading

What is vCheck?

poshable

As a VMware admin there are a plethora of tools to assist you in gaining visibility into your virtual environment.  I’ve seen folks layer on three or four tools at a time in an attempt at getting the best insight into what is going on under the virtual covers. Some of these tools excel in different areas though I have rarely found one that fits all needs. Almost all will have some sort of alerting capability to let you know when something has gone south and many of these products cost in the tens of thousands of dollars.

If there was one tool that was an absolute must have for me – vCheck – hands down.

And the best part? It’s free!
Now, vCheck is not going to replace all those shiny, expensive tools but for a single report that gives you an overview of what you are walking into in the morning, it can not be beat.

Continue reading