Tag: PowerCLI
Rebuilding Distributed Switch on New vCenter Instance Using a Backup
- Ben Liebowitz
- 0
- 2100
As you may have seen, I recently had a vCenter fail and after working with VMware Support it was determined that the vCenter should be rebuilt from scratch. Rebuilding the vCenter and adding the hosts that were in it was fairly easy. However, restoring their networking was another story. The hosts retained their previous network configuration, but I was unable…
PowerShell Script to Login to Multiple vCenter Servers
- Ben Liebowitz
- 0
- 2270
Do you have multiple vCenter servers that you interact with on a daily basis? Do you like to use PowerShell to manage them? I was opening a PowerShell window, and doing a connect-viserver for each and having to enter my PW over and over again. First, I tried to use the New-VICredentialStoreItem command to store my PW, but with security…
Upgrading VMware Tools on each ESXi Host via ESXCLI
- Ben Liebowitz
- 0
- 2821
Have you ever wanted to upgrade the version of VMware Tools on your hosts but you’re having an issue with Update Manger/Lifecycle Manager? I ran into this problem recently. I was attempting to upgrade my hosts to the latest version of VMware Tools and even though the remediation completed successfully via Lifecycle Manger finished successfully, each host still reported at…
Running VMFS Unmap via PowerCLI
- Ben Liebowitz
- 0
- 6781
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…
PowerCLI Script to Change Tag Assignment
- Ben Liebowitz
- 0
- 8231
I have an environment where, using tags, unused VMs are automatically shutdown. This is done by creating a Tag Category called “Suspend Date” and when the current value is in the past, your VM gets shutdown. I don’t have many VMs that I own in this “test” environment, but the ones that I DO have there, I want to be…
Using vSphere Tags to Check for Pending Reboot State
- Ben Liebowitz
- 0
- 3197
You may have seen my blog post on the Test-PendingReboot PowerShell module. I’ve been using it a lot lately and had the thought to use vSphere Tags to check pending reboot state. In my environment, we normally check for pending reboot states before patching. If a server is in a pending reboot state, it won’t receive the patches from SCCM,…
The Pending Reboot Nightmare… PowerShell to the Rescue!
- Ben Liebowitz
- 5
- 4808
My company has been having issues dealing with servers in a pending reboot state for quite a while. Part of it stems from using SCCM to deploy patches and having the patch deployment set to suppress the reboot and our Operations Team reboots the servers manually. Well, some months require multiple reboots and we get stuck in the rabbit hole…
PowerShell Script To Get vMotion Events
- Ben Liebowitz
- 0
- 3538
Recently, I had the need to get a list of vMotion events to pass to management. I attempted to use the Get-VIEvent cmdlet for this, but found it wasn’t easy to only pull logs from one specific cluster. I attempted to use the -Entity option and direct it to the cluster I wanted, but that didn’t work well. So I…
Using PowerCLI to Create a Local Scratch Partition
- Ben Liebowitz
- 0
- 1200
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…
vDocumentation: Check Out These Scripts To Automate Your Documentation!
- Ben Liebowitz
- 0
- 1387
Now that VMworld 2017 US has come to a close, many of the sessions are already up on youtube to watch. One of the ones I watched yesterday was SER2077BU – Achieve Maximum vSphere Stability with PowerCLI Assisted Documentation. My friend, Ariel Sanchez Mora (@arielsanchezmor), and his friend, Edgar Sanchez (@EdmSanchez13), put together these scripts to automatically document your environment.…