Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 49146

Re: vSphere automation based on VM custom attribute values

$
0
0

I see what it is. The second grouping (Group-Object -InputObject $_.Group -Property {$_.CustomFields[$caJob]}) is returning null in the Name property, so the code basically stops executing there since the if statement is going to be false. What's also funny is the formatting in tabular form. If I check this snippet in ISE, the "Group" name have VMs formatting without comma separation (like not an array?) versus if I just execute the first Group-Object statement.

 

Get-VM-Namevm-*|Group-Object-Property {$_.CustomFields['deployment']} |where {$_.Name -like'service-instance_*'} |ForEach-Object-Process {Group-Object-InputObject$_.Group -Property {$_.CustomFields['job']}}


Viewing all articles
Browse latest Browse all 49146

Trending Articles



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