VMware Cloud Community
cherishhardware
Contributor
Contributor

Find Orphenage.vmx files from datastore

I am having 5 VCs with nearly 10 to 15 Datastores in each VC.

in some case while migration or some change in datastore or hosts. some of the VM's are missing from the inventor it is very tough to check each and every datastore for orphanage .vmx files. do we have a script to search  Orphenage .vmx file in all 5 VC Datastores at a time  and output in .csv with

Out put

1, VCNAME

2, Datastore

3, Orphenage .vmx

From following input

VCname's

Thanks,

Cherish

0 Kudos
2 Replies
LucD
Leadership
Leadership

Did you already have a look at my Raiders posts ?

Shouldn't be too hard to use the Register-Vmx function with the WhatIf switch inside an Import-Csv loop.


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

0 Kudos
cherishhardware
Contributor
Contributor

Hello LUCD,

Thanks for your quick responce.

i am not able to use that script.

i want to use as in this format

all VC server  are stored in .txt file

and script should call the vc serers from .txt file and search for orphenage .vmx file and vmdk files

0 Kudos