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

A Quick Note On How To Preserve Client Source IP’s on K8s Services

namespace=ingress-nginx servicename=ingress-nginx-controller kubectl edit svc $servicename -n $namespace # edit this value from Cluster to…

Project Servers Virtualization

Project Scope: The scope of this project is limited to stabilizing production environment by ensuring…

Hyper-V Dependency on Docker’s Networking Bridge Drivers

Background: Some naive systems engineer (yours truly) has provisioned a buck load of Hyper-V servers…
Other project: DragonCoin.com