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

VMWare CVE-2018-3646 Mitigation

Enable ESXi Side-Channel-Aware Scheduler Version 2 (SCAv2) using ESXCLI SSH to an ESXi host or open a…

LAMP Stack using Docker

# Install docker and composeyum install docker docker-compose -y# Add user into docker groupusermod -aG…

Setting up proper multiple active I/O Paths between ESX and Equalogic

There are two options:1. If ESX Enterprise license is available, download Dell MEM 1.1.2 package…