Code snippet – Report VMs with independent discs
This script will report all VMs with a connected independent disc: Just fill in the name of your vCenter Server name in the first line: Connect-VIServer vcenter_server $report = @() Get-VM | where {$_...
View ArticleCode snippet – Report VMs with an open snapshot
This script will report all VMs with an open snapshot. Just fill in the name of your vCenter Server in the first line: Connect-VIServer vCenter-Server foreach($vm in Get-VM){ foreach($ss in ($vm |...
View ArticleCode snippet – Report all VMs on a datastore
This script will report all VMs and the name of the datastore. Just fill in the name of your vCenter Server in the first line: Connect-VIServer vCenter-Server foreach($ds in Get-Datastore){ foreach($vm...
View ArticleScript to write virtual machine properties into a .csv file
You want to export the properties of some or all virtual machines into a .csv file? Use the Get-VM cmdlet. It helps you to export an inventory of all or some VMs, found in your vCenter to eg. a csv...
View ArticleRescan for datastores using powercli
You are looking for a way to rescan all your hosts in a cluster for new datastores, using powercli? Here is the code snippet you are looking for: Get-Cluster ‘name_of_your_cluster‘ | Get-VMHost |...
View ArticleVMworld 2013 – Top 10 Breakout Sessions are available online
If you had no chance to visit VMworld 2013 in San Francisco this year, you have now the opportunity to view the Top 10 Breakout Sessions online for free! You can find the links to the videos at...
View ArticlePowerCli Code Snippet – Query VMware Tool Update Policy
Just for having it at hand next time… PowerCli Code Snippet to query the VMware Tools Update Policy of all VMs: Connect-VIServer vCenter_Name get-view -ViewType virtualmachine | select...
View ArticleHow to – create a local user/assign permissions on an ESXi host
Sometimes (but hopefully not very often…) you have to create a local user on your ESXi host. This how-to will show you the necessary steps using the vSphere Client as well as PowerCLI. Part 1: Using...
View ArticleScript to find all virtual machines with swapping memory
This script will list all virtual machines with swapping memory: $findswap = @() foreach($vm in (Get-View -ViewType VirtualMachine | Where-Object ` {$_.Summary.QuickStats.SwappedMemory -ne “0″})){...
View ArticleScript to find all virtual machines with ballooning memory
This script will list all virtual machines with ballooning memory: $findball = @() foreach($vm in (Get-View -ViewType VirtualMachine | Where-Object ` {$_.Summary.QuickStats.BalloonedMemory -ne “0″})){...
View Article