Tag: Automation
Running VMFS Unmap via PowerCLI
Ben Liebowitz
- 0
- 1981
Starting in vSphere 5.5, VMware introduced a new command in the esxcli namespace that allows deleted blocks to be reclaimed on thin provisioned LUNs that support the VAAI UNMAP primitive. You can run the command without any maintenance window, and the reclaim mechanism has been enhanced: Reclaim disk space size can be specified in blocks instead of a percentage value…
Using PowerCLI to Create a Local Scratch Partition
Ben Liebowitz
- 0
- 221
My company recently purchased some Dell Servers with ESXi installed to local SD cards. The issue we had was that the 8gb SD cards that came with the server and there wasn’t enough space on the cards for a scratch partition. We ordered the servers with a single 300gb HD in order to get the RAID controller, so we decided…
Script to disable protocols older than TLS 1.2 and turn off RDP
Ben Liebowitz
- 0
- 241
My InfoSec team came to us asking we disable anything older than TLS 1.2 and turn off RDP on our servers in the DMZ. We don’t allow RDP in the DMZ anyway, and they found that leaving RDP on when not using it poses a security risk. To do this, it involved multiple registry changes. With several servers to do…
PowerCLI Script to Check Host Over-commitment Percentage & Ratios
Ben Liebowitz
- 5
- 344
At my previous employer, we had a Dev/QA vSphere environment that was very over provisioned. The environment had lots of CPUReady issues with VMs having to wait for CPU time, which caused things to be slow, etc. We knew this but the application teams didn’t understand. I ended up writing a PowerCLI script to check the CPU overcommitment and sent…
Script to backup your vCenter DRS Rules
Ben Liebowitz
- 8
- 417
I was thinking yesterday, I have a script that I run on a monthly basis to backup my vDS configs… Shouldn’t I also have something that does the same for my DRS rules? So, I wrote a script that I can schedule to run on a weekly/monthly basis to backup my DRS rules. I have multiple vCenter servers, so I…
PowerCLI Script to create new vDS Portgroups
Ben Liebowitz
- 0
- 680
We deployed new hosts into one of our office locations. Because these hosts would have different number of uplinks as well as use a LAG group instead of normal dvUplinks, we decided to create a new vDS Switch. Then, we needed to re-create all the portgroups as well. I figured, instead of manually adding 15-20 portgroups, I’ll automate it. I…
Disabling FCOE on vSphere 10gb NICs per VMware KB 2130092
Ben Liebowitz
- 3
- 530
So, we recently had an issue with some of our Dell blade vSphere hosts. Seems they all crashed (PSOD) at the same time (6 nodes across 2 different clusters). After submitting the log bundles and Dell TSRs, support recommended, along with upgrading drivers & firmware (the support go to!) that we remove FCoE from the NICs (as it’s not being…
Creating shortcuts for PowerCLI that automatically log you in.
Ben Liebowitz
- 5
- 492
So, I started a new job a couple of months ago and we have multiple vCenter environments. My friend & temporary co-worker, Brian Spagna (@bspagna) and I both wanted to have shortcuts to launch PowerCLI windows and have a different background color for each to easily identify which environment we were in. We thought it would be cool to have…
Patching VMware ESXi Hosts via PowerCLI!
Ben Liebowitz
- 31
- 1370
*** Updated 5/17/2017 – See below *** This year, I’m trying something new… Anything that I have to do more than 2-3 times, I’m going to attempt to automate it! In keeping with this mantra, I recently had a task come across my plate to patch the 20+ ESXi Hosts in one of my production environments. Along with installing the…
Display list of Multiple vCenter Servers to connect to in your PowerCLI Scripts
Ben Liebowitz
- 2
- 298
If you’re company anything like mine, you probably have multiple vCenter servers in your environment. They may be linked, they may not. In my environment, we have 4 vCenter servers we consider Production, even though one is for QA, and we have a lab environment. Normally, I just connect to vCenter manually in PowerCLI before I run a command/script to…