All about virtualization
  • About
    • Privacy Policy
  • ESXTOP
    • ESXTOP vSphere 6
    • ESXTOP vSphere 5.5
  • Old Stuff
    • TechFieldDay 13
      • TechFieldDay 11
    • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
    • vSphere 6
    • Free tools
    • vBlogDB
      • Open the vBlog Database
      • vBlog diagrams
    • vBooks
    • Homelab

Code snippet – Report all VMs on a datastore

Andreas Lesslhumer 15. July 2012 0 PowerCli Snippets datastore, powercli, report, script, VMs

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 in ($ds | Get-VM)){ $vm | Select @{N=”VMname”;E={$_.Name}}, @{N=”DSName”;E={$ds.Name}}…
Read more

Tweet

Code snippet – Report VMs with an open snapshot

Andreas Lesslhumer 15. July 2012 0 PowerCli Snippets open snapshot, powercli, report, script, VMs

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 | Get-Snapshot)){ $ss | Select @{N=”VM-Name”;E={$vm.Name}}, @{N=”Snapshot”;E={$ss.Name}} } }

Tweet

Code snippet – Report VMs with independent discs

Andreas Lesslhumer 15. July 2012 0 PowerCli Snippets disc, independent, powercli, report, script, VMs

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 {$_ | Get-HardDisk | where {$_.Persistence -like…
Read more

Tweet

Post navigation

← Previous 1 … 126 127 128 129 130 Next →

Join me on Twitter

Follow @@lessi001

The views expressed anywhere on this site are strictly mine and not the opinions and views of my employer.

Privacy Policy | About