ESXi Bash script for NW packet capture using pktcap-uw utility

ESXi 6.0,6.5 are having many Random NW network disconnection issues. Its been tough to do packet captures at the right time when we are having the issues, as these are happening very sporadic in nature. Below  Shell script was written to capture the Traffic on the eth port of a VM, and we can comment out or update Read more about ESXi Bash script for NW packet capture using pktcap-uw utility[…]

PowerCli Script to List HPE Driver and Firmware

PowerCli Script to get HPE Driver and Firmware, Its ‘s  been hard coded to BL-460Gen8 and Gen9 and can be changed as per requirement.  $vmhosts = Get-Cluster “ClusterName” | get-vmHost $report = @() foreach( $ESXHost in $vmhosts) { $HWModel = get-vmHost $ESXHost | Select Name, Model $esxcli = Get-ESXcli -vmhost $ESXHost if($HWModel.Model -eq “ProLiant BL460c Read more about PowerCli Script to List HPE Driver and Firmware[…]

List the ESXi host Storage LUN Path-count, State, and DatastoreName

The below script is from Vmwareadmins.com. Thank’s to the post “http://www.vmwareadmins.com/list-the-path-and-path-state-for-every-vsphere-datastore-using-powercli/“ I have tweaked the script with few lines,  to list the DataStore Name and Naaid info, so it would be nice to have all objects in single pane of view.  All credits to “Eric Sarakaitis“   Power CLI Script :– $initalTime = Get-Date $date = Get-Date ($initalTime) Read more about List the ESXi host Storage LUN Path-count, State, and DatastoreName[…]

Custom SATP Claim Rule-Script for ESXi Host’s connecting to HPE 3PAR

Disclaimer:- The script below is from the Vmware community folks which is tweaked a little to suit my purpose, Also please test before running in production. Reboot is required to claim the LUN’s.  FYI:- In certain cases,  if the LUN is not RR already, running directly the Rule/script and rebooting the Host is not claiming the Read more about Custom SATP Claim Rule-Script for ESXi Host’s connecting to HPE 3PAR[…]

List Linux Vm’s that had VmTools status as Mounted and Being installed

For Vmware Maintenance tasks we are often get held by the Linux VM’s where we cannot VMotion them due to the Tools status that is currently showing as “Being installed”  though there is no such task being performed at that time or the task may have already been completed.   1. Get-Cluster | Get-VM | Read more about List Linux Vm’s that had VmTools status as Mounted and Being installed[…]

Day 2 Day PowerCli scripts @Work

PowerCLi OneLiners :- Please test before you run in production.  #Find HA restarted VM’s Get-Cluster “Cluster-name” | Get-VM | Get-VIEvent | where {$_.FullFormattedMessage -match “vSphere HA restarted virtual machine”} | select ObjectName,CreatedTime,FullFormattedMessage    #Update NTP Servers Get-Cluster “Cluster-Name” | Get-VMHost | Sort Name | %{ $_ | Remove-VMHostNtpServer -NtpServer ($_ | Get-VMHostNtpServer) -Confirm:$false $_ | Read more about Day 2 Day PowerCli scripts @Work[…]

PowerShell Script to update SNMP Target using vSphere Cli for ESXi Hosts

There are usually some scenarios where we have to end up using Putty and directly run esxcli commands, though we can natively make these run inside powercli the way  it works is different as we have to use  new format of esxcli like ($esxcli.system.snmp.get())… It works most of the time, but i had some issues where Read more about PowerShell Script to update SNMP Target using vSphere Cli for ESXi Hosts[…]