VMware Cloud Community
daniel_uk
Hot Shot
Hot Shot

Add a ISO

Hi,

Anyone able to provide a example of adding an ISO to all VM's in a resource pool?, would be usefull to have the opposite of remove also.

Thanks

Dan

Reply
0 Kudos
2 Replies
halr9000
Commander
Commander

Sure, no problem.

get-resourcepool foo | get-vm | get-cddrive | set-cddrive -isoPath "[datastore name] /path/to/image.iso"

Note there is a space after the datastore name, and the brackets do need to be there.

And when you are done:

get-resourcepool foo | get-vm | get-cddrive | set-cddrive -connected:$false

or, depending on what you want to do:

get-resourcepool foo | get-vm | get-cddrive | set-cddrive -nomedia






Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
Reply
0 Kudos
daniel_uk
Hot Shot
Hot Shot

Hal,

Connection of the ISO works finebut the connection status isnt working if i do -connected:$true...

Any ideas?

dan

Reply
0 Kudos