Check or Verify Esxi Credentials on Multiple Esxi Hosts

There are times that you will need to check if esxi credentials are correct & consistent across the multiple hosts, and this PowerCLI script will save your time a lot. It uses TCP port 443 so it takes a bit longer than using ssh, but the good thing is you do not need to open port 22 from your client. The process is quite simple Continue reading “Check or Verify Esxi Credentials on Multiple Esxi Hosts”

Powershell to Check VMware Network Portgroup Connectivity with VM Migration

Now, it’s a blogging time. Here is the little script that you can use to check the network connectivity of each portgroup in your vmware environment, which can also be used to determine if the portgroups or physical uplink (backing the vswitch) has the desired vlan access for the multiple exsi hosts.

This script will output the the VM’s ICMP Ping status after making vMotion to each host within the current vmware cluster (where the VM resides) or any clusters. Continue reading “Powershell to Check VMware Network Portgroup Connectivity with VM Migration”

PowerCLI Script to List VM Snapshots with Last VM Reboot Time

Again, It’s time to script, making life easier with the system admin’s boring tasks. Most of us have testing environment in which we have to play with snapshots (so called checkpoints in Hyper-V).
This script will list the VMs snapshots with the last VM power-on time. This is particularly useful in cases where you want to keep the snapshot until the VM is rebooted and proved to be fully functional after any configuration changes. Continue reading “PowerCLI Script to List VM Snapshots with Last VM Reboot Time”

How to use PowerCLI to list Device ID, Mounted URL of Datastores in VMware

Here is the PowerCLI one-liner command to find the Datastore Name, Mounted URL and Device ID in your vSphere Environment.
Assume you’ve installed VMware PowerCLI. Continue reading “How to use PowerCLI to list Device ID, Mounted URL of Datastores in VMware”

PowerCLI Connection Error: The underlying connection was closed: An unexpected error occurred on a send

PowerCLI is a very flexible tool for vSphere automation. One morning, I connect to vSphere environment & found this error. See Fig-1.

“The underlying connection was closed: An unexpected error occurred on a send”

Fig-1: Error connecting to vCenter

Continue reading “PowerCLI Connection Error: The underlying connection was closed: An unexpected error occurred on a send”

List ALL VMware SRM Protected VMs with their Protection Group Names

In your VMware Site-Recovery-Manager Environment, you may need to fetch the list of protected VMs and their associated protection group for documentation purpose. For this purpose, I created this one-liner command to fetch the necessary information with Name, Protection Group Name, Description, Replication Type & Datastore. Continue reading “List ALL VMware SRM Protected VMs with their Protection Group Names”

How to power on bulk VMs automatically in PowerCli

Here’s a script using PowerCLI to handle disaster recovery by powering on VMs while ensuring that VMs originally powered off remain off. The script includes functionality to back up the current power state of VMs, compare it with the stored power state, and display a progress bar during the recovery process.

Continue reading “How to power on bulk VMs automatically in PowerCli”

How to get CDP Information of Vmnic on Esxi Hosts

In these days, I do have to backup the CDP info of our current esxi hosts and fortunately I found script this blog and official VMware site to discover information. Only I made little changes to the script to suite my environment. You need Powercli (PowerCLI 5.5 is here) already installed and must be connected to vCenter of specific Esxi host before running the script.

Continue reading “How to get CDP Information of Vmnic on Esxi Hosts”