List all datastores and disk names

List all datastores and disk names

Get-Datastore |
Where-Object {$_.ExtensionData.Info.GetType().Name -eq "VmfsDatastoreInfo"} |
ForEach-Object {
  if ($_)
  {
    $Datastore = $_
    $Datastore.ExtensionData.Info.Vmfs.Extent |
    Select-Object -Property @{Name="Name";Expression={$Datastore.Name}},
      DiskName
  }
}

(more…)

Continue Reading List all datastores and disk names

How to check VMFS version & block sizes PowerCLI

How to check VMFS version & block sizes PowerCLI Get-Datastore | Get-View | Select-Object Name,@{N="VMFS version";E={$_.Info.Vmfs.Version}},@{N="BlocksizeMB";E={$_.Info.Vmfs.BlockSizeMB}}   NameVMFS version BlocksizeMB ---------------- ----------- TempDS 5.58 1 datastore1 5.54 1 datastore1 (3)…

Continue Reading How to check VMFS version & block sizes PowerCLI

VMware ESXi   CDP information via PowerCLI

VMware ESXi   CDP information via PowerCLI

  1. Using PowerCLI, connect to the ESX host or vCenter Server:# Connect-VIServer esx-or-vc-hostname
  2. Run this script in PowerCLI:
Get-VMHost | Where-Object {$_.ConnectionState -eq "Connected"} |
%{Get-View $_.ID} |
%{$esxname = $_.Name; Get-View $_.ConfigManager.NetworkSystem} |
%{ foreach($physnic in $_.NetworkInfo.Pnic){
    $pnicInfo = $_.QueryNetworkHint($physnic.Device)
    foreach($hint in $pnicInfo){
      Write-Host $esxname $physnic.Device
      if( $hint.ConnectedSwitchPort ) {
        $hint.ConnectedSwitchPort
      }
      else {
        Write-Host "No CDP information available."; Write-Host
      }
    }
  }
}

(more…)

Continue Reading VMware ESXi   CDP information via PowerCLI

How to change VCenter Server 5.5 Appliance IP address CLI

How to change VCenter Server 5.5 Appliance IP address CLI

  • Open a console session of the VCSA 
  • Login as: root
  • Default password is: vmware

Execute the following command 

/opt/vmware/share/vami/vami_config_net

Now you will get the option to change the network setting.

vcenter

Now you can access your server with url  https://server_ip_address:5480

(more…)

Continue Reading How to change VCenter Server 5.5 Appliance IP address CLI

How to get ESXi HBA information PowerCLI

How to get ESXi HBA information PowerCLI

If you want to gather information about you VMware ESXi Storage Connection information about HBA.

Below are the script which I tested and its works for me Its generate Cluster Name , ESXi Host name ,HBA card No, WWPN.

hbainfo

 

 

 

Below are the script. copy in notepad and save as hbainfo.ps1 (more…)

Continue Reading How to get ESXi HBA information PowerCLI

How to get list of Virtual Machines with RDM PowerCLI

How to get list of Virtual Machines with RDM PowerCLI

Today we had a requirement to know all virtual machines with RDM LUN mapped .So we can plan the carefully move that machine to another ESXi hots .I found a PowerCLI script that gave me good information about Virtual machines mapped with RDM LUNs. Source link

I got the below result .It show all VM and there connected RDM with LUN ID and HDD Details.

LUNID

 

 

(more…)

Continue Reading How to get list of Virtual Machines with RDM PowerCLI