Add-PSSnapin vmWARE.VimAutomation.Core
$vc="vCenterHostName"
connect-viserver $vc
$VMinfo = get-content "c:\VMName.csv"
foreach ($VM in $VMinfo){
Get-HardDisk -vm $VM | where {$_.Name -eq "Hard Disk 1"} |Set-HardDisk -CapacityGB 60 -Confirm:$false
}
根据实际情况更改VC名字和Hard disk number and size.
时间: 2024-10-08 11:46:19