Miscellaneous script - Export and Import your vCenter database objects

Version 3

    A while ago I ran into a problem with our vCenter database. The best solution was to start over with a new database.

    I created these scripts to help me in recreating the database layout.


    The Export script will export your vCenter database objects to several .xml files. These files can be used in combination with the Import-VCDB.ps1 script to recreate those objects into another vCenter database instance.

    Remember: The .xml files are created in the current working directory!


    I've put every step in a seperate function, so you can easily select the steps you need in your environment


    I even used the Export-VCDB.ps1 script to create a small test environment that is similar to our production environment. I just skipped the steps that were host/vm specific, as I didn't have them in the test environment ofcourse.


    Known Limitations:


    • Datacenter folders are not supported

    • Resourcepools are not supported

    • Objectnames used in vCenter must be unique, because the name is used as a unique reference

    • Cluster EVC mode is not supported


    Sample screenshot of .xml files created by the Export-VCBD.ps1 script: