Reply to Message

View discussion in a popup

Replying to:
aplechaty
Enthusiast
Enthusiast

Adding a Tag to A VM?

I have a script currently for deploying virtual machines. What I am looking to do is prompt the user with a list of Tags to select from as follows.

$Tags = "DEV-2-Week-Linux","DEV-4-Week-Linux","PROD-2-Week-Linux","PROD-2-Week-Windows"

So as the script runs I want the user to be prompted to select one of the tags. They make their selection and the script continues on. I then need the script at some point to assign the selected tag to the VM as it is created. 

 

I am having a hard time figuring out how to actually set the tag on the newly created VM. Any help is greatly appreciated. Thanks in advance.

Reply
0 Kudos