Here are commands, every vSphere admin should know: List of available interfaces and physical network cards (vmkernel + vmnic): Adding another interface (vmkernel to vMotion) in ESXi: Removing a specific interface (vmkernel) on ESX: To check if IPv6 is enabled: To enable IPv6: NOTE: After turning IPv6 on/off. reboot is required Listing information about hosts…
Read moreCategory: PowerShell
A general system error occurred: Exceeded the maximum number of permitted snapshots” error when creating a virtual machine snapshot
Before upgrading my NSX-T nodes I wanted to take a snapshot. To my surprise, I was not able to do so, as I received an error message: Exceeded the maximum number of permitted snapshots. There were no snapshots for this particular virtual machine. Having looked at the KB provided by VMware I learned that settings…
Read morePowerShell to ensure TLS1.2 is enabled
Today I will show you how to ensure that TLS1.2 is enabled. I will write a short script to perform a check and remediate if ESXi hosts are still using legacy security protocols. Please like and share to spread the knowledge in the community. If you want to chat with me please use Twitter: @AngrySysOps…
Read moreLet’s create a local user for ESXi and add the new account to the exclusion list for Lockdown Mode
Today we will use PowerCLI to create a local user for ESXi hosts and exclude that user from Lockdown Mode. The challenge is to communicate both with vCenter and ESXi at the same time. As one should know by now using the cmdlet: by default, PowerCLI will talk to vCenter instead of the ESXi host.…
Read morePowerCLI 12.7 is here and packed with a lot of new features!
The new version of PowerCLI has been released. The release has number 12.7 and is packed with new and exciting features. Along with improving the performance, VMware added new cmdlets and worked on existing ones, however, the most significant was work on a long-requested module available on PowerShell Core. Let’s have a look into PowerCLI…
Read morePower CLI Error: Invalid server certificate. Use Set-PowerCLIConfiguration to set the value for the InvalidCertificateAction option
It may happen that once you want to connect to your vCenter with PowerCLI, you may receive an error about invalid server certification. It just happened to me connecting to my home lab vCenter server. Thankfully there is an easy way to fix that issue. All you need to do is to run this one-line…
Read moreHow to determine if my virtual machines have a USB controller attached and how to remove it?
In the wake of recent published VMSA-2022-0004 admins can wonder how to determine if Virtual Machine has a USB controller attached. Now thanks to PowerCLI it is an easy task. NOTE: I did not come up with this code, this code was originally published on VMware advisory website Before admins can remove USB controllers, The virtual…
Read morePowerCLI 12.5 – What’s New – Get-VIApplianceService
The new version of PowerCLI has been released by VMware in January. It contains a bunch of new features with one particularly interesting cmdlet Get-VIApplianceService. Get-VIApplianceService retrieves the vCenter appliance services. You can filter services by name and state. There are 4 new cmdlets that have been introduced with PowerCLI 12.5: Get-VIApplianceService – Retrieves vCenter Server…
Read moreFIX: After upgrade PowerCLI to 12.5 there is no Get-VIApplianceService Command
You may come accross that after updating your PowerCLI module to version 12.5, you cannot run Get-VIApplianceService command. Even that your modules shows correct version. I initially was not able to get it to work in my lab due to several installations/versions of PowerCLI on my server. I was able to resolve the issue by…
Read morePowerShell – WARNING: Unable to resolve package source ‘https://www.powershellgallery.com/api/v2’.
I was going to update the PowerCLI module to version 12.5 once I received the above error. The first thing I was going to try was to upgrade the PowerShellGet version. This resulted in the same error. To solve this issue we need to force PowerShell to use TLS 1.2 at least. To do so…
Read more