Hi,
I require a script which can do the following,
I have two vCenter VC1 and VC2 and many VM's with same names are present in both the VC,
1. Export the complete folder structure with VM details of a datacenter from VC1 to a outputfile.
2. Then in VC2 i need to create only a particular folder with all its its sub-folders from the output file generated from VC1. This folder will be a root folder which is directly under datacenter in VC1.
3. After creating the particular folder structure, the script should read the vm's that was present in that folder & subfolder from output file and then it should search the same VM's in VC2 and place them into the folders identically.
Example:
The folder1 structure hs been taken from VC1 and has been created in VC2 with all the subfolders and placing the same VM's in the folders.
VC1
|-----Datacenter1
|------------Folder1
|-------SubFolder1
|----VM1
|----VM2
|-------Subfolder2
|-----VM3
|-----VM4
|-------------Folder2
|--------Subfolder3
|--------Subfolder4
VC2
|-----Datacenter1
|------------Folder1
|-------SubFolder1
|----VM1
|----VM2
|-------Subfolder2
|-----VM3
|-----VM4
Thanks in Advance!