VMHost and folder both use the Get-VM -Location parameter. So you need to select one and filter the other using the Where-Object cmdlet. For example:
Get-VMHost$esx_hostname |Get-VM |Where-Object {$_.Folder.Name -eq$folder_name}
VMHost and folder both use the Get-VM -Location parameter. So you need to select one and filter the other using the Where-Object cmdlet. For example:
Get-VMHost$esx_hostname |Get-VM |Where-Object {$_.Folder.Name -eq$folder_name}