This has always been a thorn in my side. How to match a VMDK to a Windows drive. This was mostly an issue when our DBAs would put multi SQL instances on the same VMs that were configured in as a failover cluster. It would never fail that the the SQL instances would be configured with similar sized drives and need to be extended.… Continue reading
Category: PowerCLI
How to Migrate VMs to New vCenter using PowerCLI
I faced this same question recently in my work environment. I was taking over the management of some infrastructure for a remote site, along with adding new hardware. The existing hardware was in a standalone vCenter, and the new hardware was connected to our enterprise vCenter. Lucky for me, the standalone vCenter was version 6.7 and has the ability to run the PowerCLI cross vCenter migrations.… Continue reading
PowerCLI to Remove VM Tags
Using VM tags to logically group VMs is awesome, but they can come a time when you need to remove the tags to apply a different one. Using the web console can be very time consuming. PowerCLI to the rescue.
Remove-TagAssignment
Using Remove-TagAssignment is powerful. You can use it to target just a single tag to be removed from a list of VMs.… Continue reading
PowerCLI to check for Python Exploit in VMware
About a week ago, I read about a python exploit that was targeting ESXi servers. I looked up the 2 CVE that were related to the exploit, CVE-2019-5544 and CVE-2020-3992. I then wanted to see if these CVE had been patched by VMware, and they have via the VMSA-2019-0022 and VMSA-2020-0023.3. Which I’ve already patched for, but I was still curious as to the contents of the file ‘/etc/rc.local.d/local.sh’.… Continue reading
Use PowerCLI to List Installed VIBs on ESXi
Recently I upgraded my environment to VMware 7u3c, but I had concerns about the issue with the i40enu VIB. Some of my hosts were running the version of ESXi that were listed as having the renamed VIB. So I really didn’t want to have to mess with downloading the python script, transferring it to the vCenter to run it.… Continue reading
Using PowerCLI to update DNS settings on VMware hosts
There nothing like an outage that causes you to double check settings across the environment. Rewind to a week ago, and that was the outage that caused doublechecking the DNS settings on everything that has DNS settings. So as the good VMware admin that I am, I wrote a quick one-liner to pull all of the DNS settings for the hosts in both of my vCenters.… Continue reading
Export vCenter Roles and Permissions with PowerCLI
This doesn’t seem like a difficult task, but configuring new roles in vCenter is just terrible. On my team at work we have one guy that does it all the time. When he does have to configure a new role he complains a lot about it, but because its so tedious. So when it can time for me to have to duplicate a role that we already have in one vCenter to another one, I wanted to see how difficult it would be to export the needed privileges and import them.… Continue reading
How to Recovery VMs on a Defective Host?
How to recover from a host failure when DRS didn’t help because it wasn’t enabled, that is a good question. Normally HA will kick in and move the workload from one host to another upon failure. This morning, our HA agent must have slept in. SMH. When I got into the office virtually this morning, I found that I had a host failure, and 57 VMs went down with the ship thinking they were the captains.… Continue reading
How to Disable SFCB Service with PowerShell
It seems like a new security exploit is being discovered and release weekly for some most products. I get it that some people have a lot of time on their hands these days. The newest exploit, VMSA-2021-0014, if you aren’t looking to upgrade again after the previous exploit then the workaround is your best solution to keeping your environment safe for now.… Continue reading
Using PowerCLI to Update ESXi License
At my office we recently upgraded our Disaster Recovery site to vSphere 7. With such, we had to upgrade our licenses from 6 to 7 for the ESXi. After importing the new license was the laborious job of updating the key on the hosts. Granted this site isn’t nearly as large as the primary site, but I wasn’t going to update the license manually on the hosts.… Continue reading