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

Re: List the folders of Vsphere webclient

$
0
0

 

#!/usr/bin/perl -w
# by Reuben Stump (http://www.virtuin.com)
use strict;
use warnings;
use VMware::VIRuntime;
Opts::parse();
Opts::validate();
Util::connect();
my $folders = Vim::find_entity_views( view_type => "Folder", properties => ['name'] );
foreach my $folder (@$folders) {
   print $folder->name . "\n";
}
Util::disconnect();
BEGIN {
   $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
}

 

 

If you want to preserve the paths of each folder, requires a bit more logic.


Viewing all articles
Browse latest Browse all 251495

Trending Articles



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