MimSyncMVObjectType - microsoft/MIMDSC GitHub Wiki
This resource is for MIM Sync MV object type.
The DSC resource configuration below validates the MIM Sync configuration by inspecting the XML below. TODO - include screen shots of the MIM Sync UI
This is a sample DSC configuration including just the Import Attribute Flow Rule resource type.
Configuration TestMimSyncMaData
{
Import-DscResource -ModuleName MimSyncDsc
Node (hostname)
{
MVObjectType TestMimSyncMVObjectType
{
ID = 'SyncObject'
Type = 'structural'
Attributes = @(
MVAttributeBinding {ID='#Alias'; Required=$false}
MVAttributeBinding {ID='#AssistantName'; Required=$false}
MVAttributeBinding {ID='#City'; Required=$false}
MVAttributeBinding {ID='#Company'; Required=$false}
MVAttributeBinding {ID='#CustomAttribute1'; Required=$false}
MVAttributeBinding {ID='#CustomAttribute10'; Required=$false}
MVAttributeBinding {ID='#CustomAttribute11'; Required=$false}
MVAttributeBinding {ID='#CustomAttribute12'; Required=$false}
MVAttributeBinding {ID='#CustomAttribute13'; Required=$false}
MVAttributeBinding {ID='#CustomAttribute14'; Required=$false}
MVAttributeBinding {ID='#CustomAttribute15'; Required=$false}
)
Ensure = 'Present'
}
}
}
This is the XML exported from the Sync Service, which is what the DSC resource validates.
<mv-data>
<schema>
<dsml:dsml xmlns:dsml="http://www.dsml.org/DSML"
xmlns:ms-dsml="http://www.microsoft.com/MMS/DSML">
<dsml:directory-schema>
<dsml:class id="Contact" type="structural">
<dsml:name>Contact</dsml:name>
<dsml:attribute ref="#Alias" required="false" />
<dsml:attribute ref="#City" required="false" />
<dsml:attribute ref="#DisplayName" required="false" />
<dsml:attribute ref="#FirstName" required="false" />
<dsml:attribute ref="#Initials" required="false" />
<dsml:attribute ref="#LastName" required="false" />
<dsml:attribute ref="#Title" required="false" />
</dsml:class>
This is sample log output showing what DSC does with the resource to validate the configuration.
VERBOSE: [CMARTBOOK]: LCM: [ Start Set ]
VERBOSE: [CMARTBOOK]: LCM: [ Start Resource ] [[MVObjectType]TestMimSyncMVObjectType]
VERBOSE: [CMARTBOOK]: LCM: [ Start Test ] [[MVObjectType]TestMimSyncMVObjectType]
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Using CacheLocation: C:\ProgramData\MimSyncDsc\Svrexport
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Using CacheAge: 1440 (in minutes)
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Cache still valid, leave it
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Finding the MV Object Type...
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Using XPath: //mv-data/schema/dsml:dsml/dsml:directory-schema/dsml:class[@id='SyncObject']
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] MV Object Type found, diffing the properties: C:\ProgramData\MimSyncDsc\Svrexport\mv.xml
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Comparing property 'name'
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] From DSC:
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] From FIM: SyncObject
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Comparing property 'type'
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] From DSC: structural
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] From FIM: structural
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Comparing attribute bindings
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] From DSC:
ID Required
-- --------
#Alias False
#AssistantName False
#City False
#Company False
#CustomAttribute1 False
#CustomAttribute10 False
#CustomAttribute11 False
#CustomAttribute12 False
#CustomAttribute13 False
#CustomAttribute14 False
#CustomAttribute15 False
#CustomAttribute2 False
#CustomAttribute3 False
#CustomAttribute4 False
#CustomAttribute5 False
#CustomAttribute6 False
#CustomAttribute7 False
#CustomAttribute8 False
#CustomAttribute9 False
#DeliverToMailboxAndForward False
#Department False
#DisplayName False
#EmailAddresses False
#ExchangeGuid False
#ExternalEmailAddress False
#Fax False
#FirstName False
#ForwardingAddress False
#HomePhone False
#HostedObjectType False
#Initials False
#Languages False
#LastName False
#LegacyExchangeDN False
#Manager False
#MobilePhone False
#Notes False
#Office False
#OnPremiseObjectDirSyncId False
#OnPremiseObjectType False
#OtherHomePhone False
#OtherTelephone False
#Pager False
#Phone False
#PostalCode False
#ResourceCapacity False
#ResourceCustom False
#RetentionUrl False
#SamAccountName False
#StateOrProvince False
#StreetAddress False
#TelephoneAssistant False
#Title False
#UserPrincipalName False
#WindowsEmailAddress False
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] From FIM:
ID Required
-- --------
#Alias False
#AssistantName False
#City False
#Company False
#CustomAttribute1 False
#CustomAttribute10 False
#CustomAttribute11 False
#CustomAttribute12 False
#CustomAttribute13 False
#CustomAttribute14 False
#CustomAttribute15 False
#CustomAttribute2 False
#CustomAttribute3 False
#CustomAttribute4 False
#CustomAttribute5 False
#CustomAttribute6 False
#CustomAttribute7 False
#CustomAttribute8 False
#CustomAttribute9 False
#DeliverToMailboxAndForward False
#Department False
#DisplayName False
#EmailAddresses False
#ExchangeGuid False
#ExternalEmailAddress False
#Fax False
#FirstName False
#ForwardingAddress False
#HomePhone False
#HostedObjectType False
#Initials False
#Languages False
#LastName False
#LegacyExchangeDN False
#Manager False
#MobilePhone False
#Notes False
#Office False
#OnPremiseObjectDirSyncId False
#OnPremiseObjectType False
#OtherHomePhone False
#OtherTelephone False
#Pager False
#Phone False
#PostalCode False
#ResourceCapacity False
#ResourceCustom False
#RetentionUrl False
#SamAccountName False
#StateOrProvince False
#StreetAddress False
#TelephoneAssistant False
#Title False
#UserPrincipalName False
#WindowsEmailAddress False
VERBOSE: [CMARTBOOK]: [[MVObjectType]TestMimSyncMVObjectType] Returning: True
VERBOSE: [CMARTBOOK]: LCM: [ End Test ] [[MVObjectType]TestMimSyncMVObjectType] in 0.1020 seconds.
VERBOSE: [CMARTBOOK]: LCM: [ Skip Set ] [[MVObjectType]TestMimSyncMVObjectType]
VERBOSE: [CMARTBOOK]: LCM: [ End Resource ] [[MVObjectType]TestMimSyncMVObjectType]
VERBOSE: [CMARTBOOK]: LCM: [ End Set ]
VERBOSE: [CMARTBOOK]: LCM: [ End Set ] in 0.2410 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 0.355 seconds