How to batch create VM disks

简介:
Add-PSSnapin vmware.vimautomation.core
$vc=" vcname "
Connect-viserver $vc
$vminfo=get-content " C:\vmname.csv "
foreach ($vm in $vminfo){
New-HardDisk -vm $vm -CapacityGB 2 -StorageFormat:EagerZeroedThick -Confirm:$false
New-HardDisk -vm $vm -CapacityGB 1 -Confirm:$false
}

Disconnect-VIServer -Confirm:$false

本文转自学海无涯博客51CTO博客,原文链接http://blog.51cto.com/549687/2044991如需转载请自行联系原作者


520feng2007

相关文章
arcgis catalog 连接sde时出现 Target state not found in the STATES table 错误
Target state not found in the STATES table [SDE.DEFAULT][STATE_ID = 8802] 除了arcgis论坛说的这种情况 http://support.esri.com/technical-article/000005952 我自己分析是stateid不在status 表中了 我根据正常的sde库分析了一下,ver
2086 0
|
6月前
|
SQL
How To Resize An ASM Disk? (Doc ID 470209.1)
1) Please backup the database(s) contained inside the associated diskgroup. 2) Then shutdown the databases contained inside the associated diskgroup. 3) Dismount the associated diskgroup to verify no client database connections are accessing this specific diskgroup: SQL> alter diskgroup <diskgro
50 2