Collect vSwicth Information Using vSphere Power CLI

In this  Post  sharing the Script to collect the Virtual Standard Switch Information from vSPhere power cli to CSV file . You can Modify  the Location of the file to save and directly apply to vSPhere Cli Window or  you can save this as .PS1  extension and run  CLI window . Script  &{foreach($esx in Get-VMHost){ […]

Read More

Virtual Network Management in Standard Switch Using Power CLI

This Post will help you to understand and create multiple port groups , Esxi host network details for complete environment  . Note : Below  commands are used on vCenter with One host , it can be used multiple servers environment . List vSwitch Inventory  Get-VirtualSwitch List Portgroup Inventory  Get-VirtualPortGroup Create a Virtual Switch Get-VmHost | […]

Read More

Find Number of VCPU used in a Cluster and ESXi hosts

This Post explain how can we generate an output contains , Total number of vCpu used in an vCenter Cluster , also it shows many vCPU used per Esxi hosts .  If you have  multiple Cluster it is very easy to find same using below script. Connect-VIServer  “vCenter Name” $TotalNumvCPUs = 0 Foreach ($Cluster in (Get-Cluster |Sort Name)){ $HostNumvCPUs = 0 Write-Host “Cluster: $($Cluster.name)“ Foreach ($ESXHost in ($Cluster |Get-VMHost |Sort Name)){ […]

Read More

NTP Conflagration with Power CLI

Check NTP Services status  Get-VMHost | Get-VmHostService | Where-Object {$_.key -eq “ntpd”}                 Check Firewall exception configuration  Get-VMHost | Get-VMHostFirewallException | where {$_.Name -eq “NTP client”}               Enable the FirewallException to all ESXi Hosts Get-VMHost | Get-VMHostFirewallException | where {$_.Name -eq “NTP […]

Read More

CBT Management with Power CLI

List all virtual machines where CBT enabled  Get-VM| Where-Object{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $true} Check specific virtual machines where CBT enabled  Get-VM  “TEST-VM-01” | Where-Object{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $true} List all virtuals machine where CBT disabled Get-VM| Where-Object{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $false} Check specific virtual machines where CBT disabled Get-VM  “TEST-VM-01” | Where-Object{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $false} Note : In GUI mode we cannot […]

Read More

Snapshot Management with Power CLI

Command to list the  properties of snapshot  using  power cli get-vm | get-snapshot | format-list Description Created Quiesced PowerState VM VMId Parent ParentSnapshotId ParentSnapshot Children SizeMB IsCurrent IsReplaySupported ExtensionData Id Name Uid Generate complete snapshot inventory with few details        get-vm | Get-Snapshot Export complete snapshot inventory to csv file get-vm | get-snapshot […]

Read More

Power CLI Command to List Connected Disks to ESXi Hosts

Get connected disk details including name , Multipathing , LunType  of all ESXI HOSTS in vCenter Get-VMHost | Get-ScsiLun -LunType disk User below command to export all the details to CSV Get-VMHost | Get-ScsiLun -LunType disk |export-csv C:\diskinfo.csv Get connected disk details including name , Multipathing , LunType  for Specific ESXI HOST Get-VMHost  “ESXI-TEST.LOCAL.COM” | Get-ScsiLun […]

Read More