your home for end-user virtualization!

PowerCLI

Update the DNS Suffix on your cluster of ESX hosts using PowerCLI

Using PowerCLI, you can quickly update the DNS Suffix on the hosts in your cluster using this short one-liner. get-cluster “LabManager” | get-vmhost | get-vmhostnetwork | set-vmhostnetwork -searchdomain “one.lab.org”, “two.lab.org”

Tags: , , ,

Posted in Cloud, PowerCLI, Powershell, vmware | No Comments »

List the vMotion IP Address and Subnet mask for each vSphere ESX host using PowerCLI

I ran into a couple misconfigurations, so I wrote a quick online to audit all of my host configurations without having to use the dreaded host profiles get-vmhost | % {(get-view $_.id).config.vmotion.ipconfig} | select ipaddress, subnetmask

Tags: , ,

Posted in Cloud, PowerCLI, Powershell, vmware | 1 Comment »

List the Path and Path State for every vSphere Datastore using PowerCLI

List the Path and Path State for every vSphere Datastore and then output to CSV using PowerCLI $initalTime = Get-Date $filepath = “C:\tmp” $filename = “LunPathState” $date = Get-Date ($initalTime) -uformat %Y%m%d $time = Get-Date ($initalTime) -uformat %H%M Write-Host “$(Get-Date ($initalTime) -uformat %H:%M:%S) – Starting” $AllHosts = Get-VMHost | Sort Name $reportLunPathState = @() Write-Host […]

Tags: , ,

Posted in Cloud, PowerCLI, Powershell, vmware | 14 Comments »

Reset the vSphere Memory Limit using PowerCLI

If you’ve ever migrated clusters or joined VM’s from a different cluster, I’m sure you’ve run into the bug where memory limits are set on the VM’s automatically. To remove this, simply use the powerful oneliner below! Get-VM | Get-VMResourceConfiguration | where {$_.MemLimitMB -ne ‘-1’} | Set-VMResourceConfiguration -MemLimitMB $null

Tags: , ,

Posted in Cloud, PowerCLI, Powershell, vmware | No Comments »

Search

Categories