728x90
There is nothing more annoying than when people leave ISO's mounted to VM's. It drives me mad.This little script will list machines that have ISO's mounted and then if you like you bulk unmount them. Enjoy
This will just list all your VM's and show you the status od the DVD drive :
$clusternodes = Get-ClusterNode
ForEach ($clusternode in $clusternodes)
{get-VM -ComputerName $clusternode.Name | Get-VMDvdDrive }`
If you want to bulk unmount them its the same command with a little bit at the end
$clusternodes = Get-ClusterNode
ForEach ($clusternode in $clusternodes)
{get-VM -ComputerName $clusternode.Name | Get-VMDvdDrive | Set-VMDvdDrive -Path $null}`
This will recurse through ever node in your cluster, so if you have a large environment, don't panic, it will take a while.
728x90
'IT이야기 > Hyper-V' 카테고리의 다른 글
Hyper-V 인증서는 30일 이내에 만료됩니다. (0) | 2022.12.07 |
---|---|
PowerShell, Hyper-V : Set VM IP from the host (0) | 2022.11.29 |
Windows Storage spaces S2D(3Node) (0) | 2022.11.29 |
Fault tolerance and storage efficiency on Azure Stack HCI and Windows Server clusters (0) | 2022.11.29 |
Adding ESX/vCenter to SCVMM (0) | 2022.11.29 |