Automation

 View Only
  • 1.  How can i change vm remark by powercli?

    Posted Aug 06, 2022 04:18 PM

    I want to change 1000 vm's remark , but i don't know!

    I want to change the vm's note(remark) in the vCenter.

    虚拟机备注.png



  • 2.  RE: How can i change vm remark by powercli?

    Posted Aug 06, 2022 04:45 PM

    Basically, that can be done with the Set-VM cmdlet and the Notes parameter.

    Get-VM -Name MyVM | Set-VM -Notes 'Newnotes'

     



  • 3.  RE: How can i change vm remark by powercli?

    Posted Aug 06, 2022 05:56 PM

    Thank you very much! But your method requires manual verification。I make it. 解决方法.png

     

    .I make a csv(utf-8)  and import it  to  powercli 。 use the code in the pic , to change the vm's notes without manual verification。



  • 4.  RE: How can i change vm remark by powercli?

    Posted Aug 06, 2022 06:03 PM

    How to make it without confirmation?



  • 5.  RE: How can i change vm remark by powercli?

    Posted Aug 06, 2022 06:32 PM

    Like this

    Get-VM -Name MyVM | Set-VM -Notes 'Newnotes' -Confirm:$false


  • 6.  RE: How can i change vm remark by powercli?

    Posted Aug 08, 2022 03:41 AM

    Yes,You are right. Thank you very much !