-
Notifications
You must be signed in to change notification settings - Fork 10
MimSyncImportAttributePrecedence
Craig Martin edited this page Feb 27, 2019
·
1 revision
This resource is for MIM Sync import attribute flow rules.
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 TestMimSyncImportAttributePrecedenceConfig
{
Import-DscResource -ModuleName MimSyncDsc
Node (hostname)
{
ImportAttributePrecedence 'Contact-DisplayName'
{
MVObjectType = 'Contact'
MVAttribute = 'DisplayName'
Type = 'ranked'
RankedPrecedenceOrder = @(
RankedPrecedenceOrder{Order = 0; ManagementAgentName='GrandHR'; CDObjectType='robot'; ID='{86E75ABE-B15D-4CFF-A785-BC968965A361}'}
RankedPrecedenceOrder{Order = 1; ManagementAgentName='TinyHR'; CDObjectType='person'; ID='{385176D8-4EB8-4900-B627-DBAF137C8FF3}'}
RankedPrecedenceOrder{Order = 2; ManagementAgentName='TinyHR'; CDObjectType='person'; ID='{AF5CA310-1D8C-4669-95C2-1F7D0482CB8F}'}
RankedPrecedenceOrder{Order = 3; ManagementAgentName='TinyHR'; CDObjectType='person'; ID='{E1261AAA-DE1A-4AF0-8373-2C6C6FB76713}'}
)
}
}
}
TestMimSyncImportAttributePrecedenceConfig -OutputPath "$env:TEMP\TestMimSyncImportAttributePrecedenceConfig"
Start-DscConfiguration -Path "$env:TEMP\TestMimSyncImportAttributePrecedenceConfig" -Force -Wait -Verbose
This is the XML exported from the Sync Service, which is what the DSC resource validates.
<mv-data>
<import-attribute-flow>
<import-flow-set mv-object-type="Contact">
<import-flows mv-attribute="DisplayName" type="ranked">
<import-flow src-ma="{C28C379C-E494-4A08-B36D-A15B00507394}" cd-object-type="robot" id="{86E75ABE-B15D-4CFF-A785-BC968965A361}">
<direct-mapping>
<src-attribute>FirstName</src-attribute>
</direct-mapping>
</import-flow>
<import-flow src-ma="{9C3614F6-F975-4F32-9504-C821CBE36471}" cd-object-type="person" id="{385176D8-4EB8-4900-B627-DBAF137C8FF3}">
<scripted-mapping>
<src-attribute>FirstName</src-attribute>
<src-attribute>LastName</src-attribute>
<script-context>cd.person:FirstName,LastName->mv.Contact:DisplayName</script-context>
</scripted-mapping>
</import-flow>
<import-flow src-ma="{9C3614F6-F975-4F32-9504-C821CBE36471}" cd-object-type="person" id="{AF5CA310-1D8C-4669-95C2-1F7D0482CB8F}">
<direct-mapping>
<src-attribute>LastName</src-attribute>
</direct-mapping>
</import-flow>
<import-flow src-ma="{9C3614F6-F975-4F32-9504-C821CBE36471}" cd-object-type="person" id="{E1261AAA-DE1A-4AF0-8373-2C6C6FB76713}">
<direct-mapping>
<src-attribute>FirstName</src-attribute>
</direct-mapping>
</import-flow>
</import-flows>
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 ] [[ImportAttributePrecedence]Contact-DisplayName]
VERBOSE: [CMARTBOOK]: LCM: [ Start Test ] [[ImportAttributePrecedence]Contact-DisplayName]
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Using CacheLocation: C:\ProgramData\MimSyncDsc\Svrexport
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Using CacheAge: 1440 (in minutes)
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Cache still valid, leave it
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Finding import attribute flow rules for [Contact].DisplayName ...
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Using XPath: //mv-data/import-attribute-flow/import-flow-set[@mv-object-type='Contact']/import-flows[@mv-attribute='DisplayName']
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Attribute flow rules found, diffing the precedence properties...
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Comparing property 'type'
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] From DSC: ranked
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] From FIM: ranked
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Comparing ranked precedence order
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] From DSC:
Order ManagementAgentName CDObjectType ID
----- ------------------- ------------ --
0 GrandHR robot {86E75ABE-B15D-4CFF-A785-BC968965A361}
1 TinyHR person {385176D8-4EB8-4900-B627-DBAF137C8FF3}
2 TinyHR person {AF5CA310-1D8C-4669-95C2-1F7D0482CB8F}
3 TinyHR person {E1261AAA-DE1A-4AF0-8373-2C6C6FB76713}
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] From FIM:
Order ManagementAgentName CDObjectType ID
----- ------------------- ------------ --
0 GrandHR robot {86E75ABE-B15D-4CFF-A785-BC968965A361}
1 TinyHR person {385176D8-4EB8-4900-B627-DBAF137C8FF3}
2 TinyHR person {AF5CA310-1D8C-4669-95C2-1F7D0482CB8F}
3 TinyHR person {E1261AAA-DE1A-4AF0-8373-2C6C6FB76713}
VERBOSE: [CMARTBOOK]: [[ImportAttributePrecedence]Contact-DisplayName] Returning: True
VERBOSE: [CMARTBOOK]: LCM: [ End Test ] [[ImportAttributePrecedence]Contact-DisplayName] in 0.8110 seconds.
VERBOSE: [CMARTBOOK]: LCM: [ Skip Set ] [[ImportAttributePrecedence]Contact-DisplayName]
VERBOSE: [CMARTBOOK]: LCM: [ End Resource ] [[ImportAttributePrecedence]Contact-DisplayName]
VERBOSE: [CMARTBOOK]: LCM: [ End Set ]
VERBOSE: [CMARTBOOK]: LCM: [ End Set ] in 1.3540 seconds.
- Home
- FAQ
- MIM Sync DSC Approach
- Generating DSC Configs
- MIM Sync DSC Resources
- MIM Service DSC Resources
- Coming Soon!
- MIM CM DSC Resources
- Let us know
- Related Projects
- MCS PAM