Modify disk classifications in Virtual Machine Manager (VMM) using PowerShell

Do you need to modify large number of disk classifications in System Center Virtual Machine Manager (SCVMM)? It is very simple in PowerShell.

Get-SCVMHost -VMMServer MyVMMserver -ComputerName MyHyperV -OutVariable vmHost |
    Format-Table -Property FQDN, ProcessorModel

$storageClassification = Get-SCStorageClassification -Name 'My disk class'
Get-SCStorageDisk -VMHost $vmHost[0] -OutVariable hostDisk | Format-Table -Property Name, Classification
$hostDisk | Set-SCStorageDisk -StorageClassification $storageClassification | Format-Table -Property Name, Classification

Leave a Reply

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