Saturday, March 5, 2016

VMware PowerCLI get Folder wise VM details

clear
$fol_list=get-folder

foreach($_ in $fol_list)
{

    $thisfol=$_.name
    write-host " Folder Name : " $thisfol
    $vms=get-folder -name $thisfol |get-vm |select name
    foreach($item in $vms)
    {
        write-host $item.name
    }
}

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...