Got an issue with Hyper-V servers connected to media?
Run this.
Run this.
[string[]]$cn =
Get-ADComputer -Filter
* -SearchBase
'OU=Hypervisors,OU=Services,DC=internal'
| select -ExpandProperty dnshostname
$vm =
Get-VM -ComputerName
$cn -Name *
$vm |
Get-VMDvdDrive |
? DvdMediaType
-ne None | Set-VMDvdDrive -Path:$null
No comments:
Post a Comment