Synchronization of Schema Extensions

Synchronises the schema extensions of two drives.


Examples:


Hint: The examples require two connected PowerShell drives on the environments to be synchronized.


Here, the schema extensions are synchronized with the source drive pointing to the production environment and the target drive representing a sandbox environment:


$SyncSource = Get-EmdbDrive -Name Production

$SyncTarget = Get-EmdbDrive -Name Sandbox

Sync-EmdbObjectSchema -Source $SyncSource -Target $SyncTarget


If the -Mirror switch parameter is specified, the source environment's schema is mirrored to the destination environment. This means that schema extensions of the target drive that do not exist in the source drive environment are deleted there:


Sync-EmdbObjectSchema -Source $SyncSource -Target $SyncTarget -Mirror


It is also possible to synchronize only parts of the schema. In the last example only schema extensions to objects defined in $SchemaTags are synchronized, here the schemas of computers and software packages: 


$SchemaTags = "Computer", "Software"

Sync-EmdbObjectSchema -Source $SyncSource -Target $SyncTarget -SchemaTags $SchemaTags