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 […]

PowerShell – Script to run one-time full deduplication including optimization, garbage collection and scrubbing

I wrote a simple script to run full deduplication. It is handy when you need one-time deduplication including garbage collection and scrubbing job. $ErrorActionPreference = ‘Stop’ Function Wait-RvDedupJob { Write-Warning -Message ‘Wait for all jobs to finish’ while (Get-DedupJob -ErrorAction SilentlyContinue) { Start-Sleep -Seconds 10 } } Get-DedupVolume | ForEach-Object -Process ` { $_.Volume Wait-RvDedupJob […]