Reply to Message

View discussion in a popup

Replying to:
natxoasenjo
Enthusiast
Enthusiast

sorry, I cannot seem to be able to edit this post and this forum messes with the code and has no preview button Smiley Sad

# get all esx hosts in Datacenter

my $esxhost_view = Vim::find_entity_views(

    view_type  => 'HostSystem',

    properties => [ 'name', 'config.dateTimeInfo', ]

);

for my $host ( sort { $a->name cmp $b->name } @$esxhost_view ) {

    print $host->name . "\n";

    #print Dumper $host;

    print $host->config->dateTimeInfo;

}

Reply
0 Kudos