Script to find Snapshots\RMDS\ISOs in VSphere

Script to get snapshots , RDMS, ISOs in vCenter

Within 5.5 where machines are going to be migrated from

Want to do a check on source VMs to make sure they don't have any local devices attached to them, whats best way to tabulate this list?

I also want to check snapshots, which i have completed using RVtools and script below

get-vm | get-snapshot | FT VM, SizeGB, Created, Name, Description (The figures tally up there is only 3 vms with snapshots)

Is there a best way to get list of RMDs, ISOs, from vCenter or through a script?
Who is Participating?
Ajay ChananaMCSE-2003/08|RHCSA| VCP5/6 |vExpert2018Commented:
To Find RDM  check article. -

I understand ISO could be trouble  when you want to detach those. check the below script to find VM.

Get-VM | FT Name, @{Label="ISO file"; Expression = { ($_ | Get-CDDrive).ISOPath }}

Dismount ISO by below command.

Get-VM | Get-CDDrive | where {$_.IsoPath -ne $null} | Set-CDDrive -NoMedia -Confirm:$False
Indie101Author Commented:
Couldnt export it to csv so referenced which worked fine

Get-VM | where {($_ | Get-CDDrive).ISOPath -ne $null}  | select Name, @{Label="ISO file"; Expression = { ($_ | Get-CDDrive).ISOPath }} | export-csv c:\temp\export-iso.csv -NoTypeInformation -UseCulture
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.