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

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
vBlog Database

Recent Comments

  • christoph on Veeam Backup & Replication Version 10 at a glance poster
  • Rizwana on HPE ProLiant Server End of Service Life (EOSL) and Retired Matrix
  • MRa on How to forcibly stop a dedicated Veeam job stuck in „stopping“ status
  • Hans Müller on HPE ProLiant Server End of Service Life (EOSL) and Retired Matrix
  • Igor on How to initially process all existing backups with a new Veeam backup copy job

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

Privacy Policy | About