码迷,mamicode.com
首页 > 其他好文 > 详细

批量修改vm Annotation

时间:2017-10-20 16:04:22      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:vm


$vms = Get-Content C:\VMlists\vm.txt


echo $vms


foreach ($vm in $vms)

{


Write-Host "set $vm"


Get-vm $vm | Set-Annotation -CustomAttribute "Created" -Value 

Get-vm $vm | Set-Annotation -CustomAttribute "Created by" -Value 

Get-vm $vm | Set-Annotation -CustomAttribute "Description" -Value 

Get-vm $vm | Set-Annotation -CustomAttribute "Domain" -Value 

Get-vm $vm | Set-Annotation -CustomAttribute "Environment" -Value 

Get-vm $vm | Set-Annotation -CustomAttribute "Owner" -Value 




}


批量修改vm Annotation

标签:vm

原文地址:http://littlebamboo.blog.51cto.com/4641172/1974599

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!