VMware Cloud Community
windvally
Contributor
Contributor

How to check CDROM and export result to HTML

I want to check Whether the VM have CDrom connected. and export the result  to A html file

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

You could do something like this

Get-VM | Get-CDDrive | where {$_.IsoPath} |
Select @{N="VM";E={$_.Parent.Name}},Name,@{N="ISO";E={$_.IsoPath}} |
ConvertTo-Html | Out-File report.html

The HTML output is basic, you can make it more fancy.

See for example Creating Formatted HTML Output


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

Reply
0 Kudos