Posted On July 23, 2020

Hyper-V: Search for Guest VMs Utilizing Certain Storage Paths

kimconnect 0 comments
blog.KimConnect.com >> Virtualization >> Hyper-V: Search for Guest VMs Utilizing Certain Storage Paths
$pathSearch='C:\ClusterShare\RandomFolder'

$pathSearch='C:\ProgramData'
$allHyperVHosts={(Get-ClusterNode | Where { $_.State –eq "Up" }).Name | %{$_.ToLower()}}.Invoke() 
$allVms=foreach ($hyperVHost in $allHyperVHosts){invoke-command -computername $hyperVHost -scriptblock{Get-VM |select Name,Path}}
$allVms|?{$_.Path -like "*$pathSearch*"}

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How to Install Virtualbox in Ubuntu

Simply run these two commands: sudo add-apt-repository multiverse && sudo apt-get update sudo apt -y…

PowerShell: Obtain List of Hyper-V Hosts via Active Directory

# listHyperVHostsInForests.ps1 # Version: 0.03 function listHyperVHostsInForests{ # Ensure that AD management module is available…

Install ESX 5.5 on 5th Generation NUC

Download the following:- ESX 5.5 ISO- ESXi-Customizer v2.7.2 - net-e1000e-3.1.0.2-glr-offline_bundle.zip (https://vibsdepot.v-front.de/wiki/index.php/Net-e1000e)- uNetbootinFollow these steps:- Edit…