MimSyncRunProfile - microsoft/MIMDSC GitHub Wiki

This resource is for MIM Sync Run Profile 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

DSC Configuration

This is a sample DSC configuration including just the Import Attribute Flow Rule resource type.

Configuration TestMimSyncRunProfile 
{ 
    Import-DscResource -ModuleName MimSyncDsc

    Node (hostname) 
    { 
        RunProfile '[TinyHR]FISO'
        {
            ManagementAgentName   = 'TinyHR'
            Name                  = 'FISO'
            RunSteps              = @(
                RunStep{
                    StepType            = 'full-import'
                    StepSubType         = @('to-cs')
                    PartitionIdentifier = '{08F64D3F-B82C-44E2-AC6F-9F680DECFEBE}'
                    InputFile           = 'tinyhr.txt'
                    PageSize            = 0
                    Timeout             = 0
                    ObjectDeleteLimit   = 0
                    ObjectProcessLimit  = 0
                    LogFilePath         = '' 
                    DropFileName        = ''
                    FakeIdentifier      = [Guid]::Empty
                }
            )
            Ensure                 = 'Present'
        }
    }
} 

MIM Sync XML

This is the XML exported from the Sync Service, which is what the DSC resource validates.

<ma-run-data>
    <run-configuration>
        <id>{1BB4B3A9-B619-446C-816E-551F626B1C16}</id>
        <name>FISO</name>
        <creation-time>2019-02-13 06:35:57.707</creation-time>
        <version>1</version>
        <last-modification-time>2019-02-13 06:35:57.707</last-modification-time>
        <configuration>
            <step>
                <step-type type="full-import">
                    <import-subtype>to-cs</import-subtype>
                </step-type>
                <threshold></threshold>
                <partition>{08F64D3F-B82C-44E2-AC6F-9F680DECFEBE}</partition>
                <custom-data>
                    <run-config>
                        <input-file>tinyhr.txt</input-file>
                    </run-config>
                </custom-data>
            </step>
        </configuration>
    </run-configuration>

DSC Verbose Output

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 ]  [[RunProfile][TinyHR]FISO]
VERBOSE: [CMARTBOOK]: LCM:  [ Start  Test     ]  [[RunProfile][TinyHR]FISO]
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO] Using CacheLocation: C:\ProgramData\MimSyncDsc\Svrexport
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO] Using CacheAge:      1440 (in minutes)
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO] Cache still valid, leave it
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO] Finding run profile 'FISO' on management agent 'TinyHR'...
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]   Using XPath: //ma-data[name='TinyHR']/ma-run-data/run-configuration[name='FISO']
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO] Run Profile found, diffing the properties: C:\ProgramData\MimSyncDsc\Svrexport\MA-TinyHR.XML
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]   Skipping system-owned attribute: ManagementAgentName
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]   Comparing property 'Name' using XPath: name
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]     From DSC: FISO
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]     From FIM: FISO
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]   Skipping system-owned attribute: DependsOn
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]   Skipping system-owned attribute: Ensure
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]   Skipping system-owned attribute: PsDscRunAsCredential
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]   Comparing property RunSteps using XPath: configuration/step
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]     From DSC: 1
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO]     From FIM: 1
VERBOSE: [CMARTBOOK]:                            [[RunProfile][TinyHR]FISO] Returning: True
VERBOSE: [CMARTBOOK]: LCM:  [ End    Test     ]  [[RunProfile][TinyHR]FISO]  in 6.2380 seconds.
VERBOSE: [CMARTBOOK]: LCM:  [ Skip   Set      ]  [[RunProfile][TinyHR]FISO]
VERBOSE: [CMARTBOOK]: LCM:  [ End    Resource ]  [[RunProfile][TinyHR]FISO]
VERBOSE: [CMARTBOOK]: LCM:  [ End    Set      ]
VERBOSE: [CMARTBOOK]: LCM:  [ End    Set      ]    in  6.7900 seconds.
⚠️ **GitHub.com Fallback** ⚠️