chris.childerhose wrote:UPDATE: Updated to latest PS and this gives me results in the column but still there is an issue with the multi-VM jobs not showing the VMs selected in the job. The 1 VM jobs show properly. So I think the second statement about creating the string output but adding array based objects is the issue. So I need some assistance with this.
There are a couple of ways to attack this, but probably the easiest is just to use the -join option, so something like:
- Code: Select all
$Objects = $Job.GetViOijs()
$jobOptions | Add-Member -MemberType NoteProperty -Name "Objects" -value ($Objects.name -join ",")
You've talked about a lot of different code options up above so I'm a little confused about what code you're actually running now. If what I just posted doesn't help post a quick snippet of the code you're currently running that's working for jobs with 1 VM and we'll go from there, but the simple -join should be all you need.