Quantcast
Channel: VMware Communities : Popular Discussions - vCloud Director PowerCLI
Viewing all articles
Browse latest Browse all 13334

All vCloud VMs in a provider vDC

$
0
0

Trying to get all VMs use a provider. The issue is making the call from the provider to then get all the vApps - it cannot be made this way

 

Does anyone have a clean way of perfroming this action? ( A whole cluster (One of the many provider vDCs we have ) is going down, so i would like to generate a list.

 

Every Org has anywhere from 1-5 organization vDCs, so parsing it that way is a last resort in my book.

 

Thoughts? Suggestions?

 

 

$report = @()

$list = Get-ProviderVdc "Provider vDC" | get-civapp

foreach ($Vapp in $list){    $vms = $vapp | get-civm        foreach($vm in $vms){        if($vm) {            $vm | %{    $row = "" | select "name", "owner", "Email"    $row."name" = $_.name    $row."owner" = $vapp.Owner.FullName    $row."Email" = $vapp.Owner.Email        }    }    $report += $row    }    }        $report = $report | Sort-Object -Property Owner        $report | export-csv "C:\Vcloud-cluster-VMs.csv" -NoTypeInformation -UseCulture

Viewing all articles
Browse latest Browse all 13334

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>