VMware Cloud Community
inderraw
Contributor
Contributor

how to rename vm tag- Assigned tag

Hi Team,

How to rename vm tag- assigned tag on multiple vm via script.

 

inderraw_1-1686185040136.png

 

0 Kudos
8 Replies
LucD
Leadership
Leadership

You can rename a tag with the Set-Tag cmdlet.

Get-Tag -Name 'external' | Set-Tag -Name 'NewName'


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
inderraw
Contributor
Contributor

Thanks,

but how to rename vm tag-Assinged tag for multiple vm via script.

 

0 Kudos
inderraw
Contributor
Contributor

how to rename vm tag- Assigned tag for multiple vm specific vm list.

0 Kudos
LucD
Leadership
Leadership

Read the list and then use a loop over all the VMs.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
inderraw
Contributor
Contributor

I mean can we import excel sheet with number of vm list to rename vm tag.

0 Kudos
LucD
Leadership
Leadership

Yes, you can.
If it is a CSV you can use Import-Csv.
If it is an XLSX you can use the Import-Excel cmdlet from the ImportExcel module.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
inderraw
Contributor
Contributor

can you help me with this script import vm in csv format and then rename tag.

0 Kudos
LucD
Leadership
Leadership

So in the end you don't want to know how to code this, you just want a script.
Seen your past history where you don't seem to reply to threads you started, I'm going to pass on that.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos