Run Profiles¶
Run Profile cmdlets manage and execute synchronisation Run Profiles on Connected Systems. A Run Profile defines a specific operation type (import, synchronisation, or export) that can be executed against a Connected System. Use these cmdlets to list, create, modify, remove, and trigger Run Profiles. Run Profiles explains the settings, including the Safeguards and Allow Object Type Changes.
Get-JIMRunProfile¶
Retrieves one or more Run Profiles for a Connected System, identified either by Connected System ID or Connected System name, with an optional name filter.
Syntax¶
# ById (default)
Get-JIMRunProfile -ConnectedSystemId <int> [-Name <string>]
# ByName
Get-JIMRunProfile -ConnectedSystemName <string> [-Name <string>]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ConnectedSystemId |
int |
Yes (ById) | The Connected System whose Run Profiles to get. Accepts pipeline input by property name, ConnectedSystemId or Id. |
|
ConnectedSystemName |
string |
Yes (ByName) | The name of the Connected System whose Run Profiles to get. Must be an exact match. | |
Name |
string |
No | Return only the Run Profiles whose name matches, for example "Full*". Supports wildcards. |
Output¶
Each Run Profile on the Connected System, or each one whose name matches -Name.
| Property | Type | Description |
|---|---|---|
Id |
int |
The unique identifier of the Run Profile. |
Name |
string |
The user-supplied name for this Run Profile. |
ConnectedSystemId |
int |
The Connected System this Run Profile belongs to. |
RunType |
string |
The type of synchronisation operation (FullImport, DeltaImport, FullSynchronisation, DeltaSynchronisation, Export). One of NotSet, FullImport, DeltaImport, FullSynchronisation, DeltaSynchronisation or Export. |
PageSize |
int |
How many items to process in one batch. |
Enabled |
bool |
Whether this Run Profile can run. A disabled Run Profile is refused wherever a run can start: the portal, the REST API, PowerShell and Schedule steps, where the step fails with the reason. |
DisabledReason |
string |
Why this Run Profile is disabled: Manual when an administrator disabled it, or PartitionRemoved when a hierarchy refresh removed the partition it targeted. Empty while it is enabled. One of Manual or PartitionRemoved. |
DisabledPartitionName |
string |
For a Run Profile a hierarchy refresh disabled, the name of the partition it removed, which is what the Run Profile used to read. Empty otherwise. |
PartitionName |
string |
The partition name if this Run Profile targets a specific partition. |
TargetsDeselectedPartition |
bool |
True when this Run Profile targets a partition that is no longer selected on the Connected System, which makes the Run Profile inoperable: a deselected partition is not managed by JIM, so executing this Run Profile is refused rather than reading scope the administrator has withdrawn. |
FilePath |
string |
The file a Full Import or Delta Import reads, for a file-based Connector; empty when it reads the Connected System's File Path. |
VerifyImportContentHashes |
bool |
Whether Verification Mode is enabled: the Full Import skips no object whose content looks unchanged, and instead raises an error for any object whose stored content hash disagrees with what was read. Only meaningful when RunType is FullImport. |
AllowObjectTypeChanges |
bool |
Whether this Full Import carries out an Object Type change rather than refusing it. Only ever true when RunType is FullImport, and only has an effect on a Connected System whose Connector can tell an Object Type change from a new object, as the LDAP Connector can. |
Safeguards |
object |
The limits on what this Run Profile may attempt. Always present. It has MaxCreates, MaxUpdates, MaxDeletes, MaxDetectedDeletions and MaxDetectedDeletionsPercent. |
Safeguards carries MaxCreates, MaxUpdates and MaxDeletes for an Export Run Profile, and MaxDetectedDeletions and MaxDetectedDeletionsPercent for a Full Import or Delta Import; each is empty when that limit is not set.
Examples¶
Get-JIMConnectedSystem -Name "Active Directory" | Get-JIMRunProfile
Get-JIMRunProfile -ConnectedSystemId 1 | Where-Object { -not $_.Enabled } | Select-Object Name, DisabledReason, DisabledPartitionName
New-JIMRunProfile¶
Creates a new Run Profile on a Connected System.
Syntax¶
# ById (default)
New-JIMRunProfile [-Name] <string> -ConnectedSystemId <int> -RunType <string> [-PageSize <int>] [-PartitionId <int>] [-FilePath <string>] [-VerifyImportContentHashes] [-AllowObjectTypeChanges] [-MaxCreates <int>] [-MaxUpdates <int>] [-MaxDeletes <int>] [-MaxDetectedDeletions <int>] [-MaxDetectedDeletionsPercent <int>] [-PassThru] [-WhatIf] [-Confirm]
# ByName
New-JIMRunProfile [-Name] <string> -ConnectedSystemName <string> -RunType <string> [-PageSize <int>] [-PartitionId <int>] [-FilePath <string>] [-VerifyImportContentHashes] [-AllowObjectTypeChanges] [-MaxCreates <int>] [-MaxUpdates <int>] [-MaxDeletes <int>] [-MaxDetectedDeletions <int>] [-MaxDetectedDeletionsPercent <int>] [-PassThru] [-WhatIf] [-Confirm]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ConnectedSystemId |
int |
Yes (ById) | The Connected System to create the Run Profile on. Accepts pipeline input by property name, ConnectedSystemId or Id. |
|
ConnectedSystemName |
string |
Yes (ByName) | The name of the Connected System to create the Run Profile on. Must be an exact match. | |
Name |
string |
Yes | The name for the Run Profile. Can be given by position, as the first argument. | |
RunType |
string |
Yes | The operation the Run Profile carries out: an import from the Connected System, a synchronisation with the Metaverse, or an export to the Connected System. One of FullImport, DeltaImport, FullSynchronisation, DeltaSynchronisation or Export. |
|
PageSize |
int |
No | 100 |
How many items to process in one batch. From 1 to 10,000. |
PartitionId |
int |
No | The partition the Run Profile targets, for a Connector with partitions. Omit it and the Run Profile follows every selected partition. | |
FilePath |
string |
No | The file a Full Import reads, for a file-based Connector. Omit it to read the file the Connected System's File Path setting names. | |
VerifyImportContentHashes |
switch |
No | Enables Verification Mode: the Full Import skips no object whose content looks unchanged, and raises an error for any object whose stored content hash disagrees with what was read. Only valid when -RunType is FullImport. Use it to check the skip, and leave it off for normal, faster Full Imports. |
|
AllowObjectTypeChanges |
switch |
No | Lets this Full Import carry out an Object Type change rather than refusing it: an object that arrives under a different Object Type is imported as a new Connected System Object, and the old one is retired. Only valid when -RunType is FullImport, and only has an effect for a Connector that can tell an Object Type change from a new object, as the LDAP Connector can. |
|
MaxCreates |
int |
No | A Safeguard: the most creates that may be pending for an Export run to attempt any of them. If more are pending when the run starts, it attempts none of them; 0 refuses creates outright. Only valid when -RunType is Export; omit it for no limit. |
|
MaxUpdates |
int |
No | A Safeguard: the most updates that may be pending for an Export run to attempt any of them, under the same rules as -MaxCreates. |
|
MaxDeletes |
int |
No | A Safeguard: the most deletes that may be pending for an Export run to attempt any of them, under the same rules as -MaxCreates. Recommended for an Export to a production directory. |
|
MaxDetectedDeletions |
int |
No | A Safeguard: the most Connected System Objects an import run may newly mark as deleted: those a Full Import no longer finds, or those a Delta Import's Connector reports deleted. If more would be, it marks none of them; 0 refuses to mark any. A Delta Import that withholds its deletions reports them again on every later run until they are let through. Only valid when -RunType is FullImport or DeltaImport; omit it for no limit. |
|
MaxDetectedDeletionsPercent |
int |
No | A Safeguard: the most Connected System Objects an import run may newly mark as deleted, as a share (0 to 100) of those in the run's scope not already marked as deleted, before it saves anything, under the same rules as -MaxDetectedDeletions. Either limit tripping withholds every deletion in the run. |
|
PassThru |
switch |
No | Returns the created Run Profile. |
Output¶
With -PassThru, the created Run Profile; otherwise nothing.
Properties as under Get-JIMRunProfile.
Examples¶
New-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import" -RunType FullImport
New-JIMRunProfile -ConnectedSystemName "Active Directory" -Name "Delta Synchronisation" -RunType DeltaSynchronisation
$rp = New-JIMRunProfile -ConnectedSystemId 1 -Name "Export" -RunType Export -PassThru
$rp.Id
New-JIMRunProfile -ConnectedSystemId 1 -Name "Delta Import" -RunType DeltaImport -PageSize 500 -PassThru
New-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import (UK)" -RunType FullImport -PartitionId 3
Get-JIMConnectedSystem -Name "CSV*" | ForEach-Object {
New-JIMRunProfile -ConnectedSystemId $_.Id -Name "Full Import" -RunType FullImport -FilePath "/connector-files/import.csv"
}
New-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import (Verified)" -RunType FullImport -VerifyImportContentHashes
New-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import (Object Type changes)" -RunType FullImport -AllowObjectTypeChanges
New-JIMRunProfile -ConnectedSystemId 1 -Name "Delta Import" -RunType DeltaImport -WhatIf
New-JIMRunProfile -ConnectedSystemId 1 -Name "Export" -RunType Export -MaxDeletes 100
New-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import" -RunType FullImport -MaxDetectedDeletionsPercent 10
New-JIMRunProfile -ConnectedSystemId 1 -Name "Delta Import" -RunType DeltaImport -MaxDetectedDeletions 50
Set-JIMRunProfile¶
Modifies an existing Run Profile. Only the settings you give change.
Syntax¶
# ById (default)
Set-JIMRunProfile -ConnectedSystemId <int> -RunProfileId <int> [-Name <string>] [-PageSize <int>] [-PartitionId <int>] [-AllSelectedPartitions] [-Enabled <bool>] [-FilePath <string>] [-VerifyImportContentHashes <bool>] [-AllowObjectTypeChanges <bool>] [-MaxCreates <int>] [-MaxUpdates <int>] [-MaxDeletes <int>] [-MaxDetectedDeletions <int>] [-MaxDetectedDeletionsPercent <int>] [-PassThru] [-WhatIf] [-Confirm]
# ByName
Set-JIMRunProfile -ConnectedSystemName <string> -RunProfileId <int> [-Name <string>] [-PageSize <int>] [-PartitionId <int>] [-AllSelectedPartitions] [-Enabled <bool>] [-FilePath <string>] [-VerifyImportContentHashes <bool>] [-AllowObjectTypeChanges <bool>] [-MaxCreates <int>] [-MaxUpdates <int>] [-MaxDeletes <int>] [-MaxDetectedDeletions <int>] [-MaxDetectedDeletionsPercent <int>] [-PassThru] [-WhatIf] [-Confirm]
# ByInputObject
Set-JIMRunProfile -InputObject <PSCustomObject> [-Name <string>] [-PageSize <int>] [-PartitionId <int>] [-AllSelectedPartitions] [-Enabled <bool>] [-FilePath <string>] [-VerifyImportContentHashes <bool>] [-AllowObjectTypeChanges <bool>] [-MaxCreates <int>] [-MaxUpdates <int>] [-MaxDeletes <int>] [-MaxDetectedDeletions <int>] [-MaxDetectedDeletionsPercent <int>] [-PassThru] [-WhatIf] [-Confirm]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ConnectedSystemId |
int |
Yes (ById) | The Connected System the Run Profile belongs to. | |
ConnectedSystemName |
string |
Yes (ByName) | The name of the Connected System the Run Profile belongs to. Must be an exact match. | |
RunProfileId |
int |
Yes (ById, ByName) | The Run Profile to update. | |
InputObject |
PSCustomObject |
Yes (ByInputObject) | The Run Profile to update, as Get-JIMRunProfile returns it. Accepts pipeline input. |
|
Name |
string |
No | The new name. | |
PageSize |
int |
No | How many items to process in one batch. From 1 to 10,000. | |
PartitionId |
int |
No | The partition the Run Profile targets, for a Connector with partitions. | |
AllSelectedPartitions |
switch |
No | Has the Run Profile read every partition selected on the Connected System, clearing the partition it targets. Cannot be combined with -PartitionId. |
|
Enabled |
bool |
No | Whether the Run Profile can run: $false disables it, and $true enables it again. A disabled Run Profile is refused wherever a run can start, Schedule steps included. Enabling one that a hierarchy refresh disabled, because it removed the partition the Run Profile targeted, also needs -PartitionId or -AllSelectedPartitions. |
|
FilePath |
string |
No | The file a Full Import reads, for a file-based Connector. Set it to an empty string to read the file the Connected System's File Path setting names. | |
VerifyImportContentHashes |
bool |
No | Whether Verification Mode is enabled: $true to enable it, $false to disable it. Only a Full Import Run Profile accepts $true. |
|
AllowObjectTypeChanges |
bool |
No | Whether this Full Import carries out an Object Type change rather than refusing it: $true to allow it, $false to go back to refusing it. Only a Full Import Run Profile accepts $true. |
|
MaxCreates |
int |
No | A Safeguard: the most creates that may be pending for an Export run to attempt any of them. 0 refuses creates outright, and $null clears the limit. Only valid on an Export Run Profile. The Safeguards you do not give keep their values. |
|
MaxUpdates |
int |
No | A Safeguard: the most updates that may be pending for an Export run to attempt any of them, under the same rules as -MaxCreates. |
|
MaxDeletes |
int |
No | A Safeguard: the most deletes that may be pending for an Export run to attempt any of them, under the same rules as -MaxCreates. |
|
MaxDetectedDeletions |
int |
No | A Safeguard: the most Connected System Objects an import run may newly mark as deleted: those a Full Import no longer finds, or those a Delta Import's Connector reports deleted. 0 refuses to mark any, and $null clears the limit. Only valid on a Full Import or Delta Import Run Profile. The Safeguards you do not give keep their values. |
|
MaxDetectedDeletionsPercent |
int |
No | A Safeguard: the most Connected System Objects an import run may newly mark as deleted, as a share (0 to 100) of those in the run's scope not already marked as deleted, before it saves anything, under the same rules as -MaxDetectedDeletions. |
|
PassThru |
switch |
No | Returns the updated Run Profile. |
Output¶
With -PassThru, the updated Run Profile; otherwise nothing.
Properties as under Get-JIMRunProfile.
Examples¶
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -Name "Full Import (Production)"
Set-JIMRunProfile -ConnectedSystemName "Contoso AD" -RunProfileId 1 -PageSize 500
Get-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import" | Set-JIMRunProfile -Name "Full Import (Renamed)" -PassThru
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -Enabled $true -PartitionId 5
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -Enabled $true -AllSelectedPartitions
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 7 -FilePath "/connector-files/import-v2.csv"
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -VerifyImportContentHashes $true
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -VerifyImportContentHashes $false
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 43 -AllowObjectTypeChanges $false
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -Name "New Name" -WhatIf
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 12 -MaxDeletes 100
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 12 -MaxDeletes $null
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 7 -MaxDetectedDeletionsPercent 10
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 8 -MaxDetectedDeletions 50
Set-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 7 -MaxDetectedDeletions $null -MaxDetectedDeletionsPercent $null
Remove-JIMRunProfile¶
Deletes a Run Profile.
Syntax¶
# ById (default)
Remove-JIMRunProfile -ConnectedSystemId <int> -RunProfileId <int> [-Force] [-PassThru] [-WhatIf] [-Confirm]
# ByName
Remove-JIMRunProfile -ConnectedSystemName <string> -RunProfileId <int> [-Force] [-PassThru] [-WhatIf] [-Confirm]
# ByInputObject
Remove-JIMRunProfile -InputObject <PSCustomObject> [-Force] [-PassThru] [-WhatIf] [-Confirm]
It asks for confirmation before it acts: -WhatIf shows what it would do, and -Force or -Confirm:$false skips the prompt.
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ConnectedSystemId |
int |
Yes (ById) | The Connected System the Run Profile belongs to. | |
ConnectedSystemName |
string |
Yes (ByName) | The name of the Connected System the Run Profile belongs to. Must be an exact match. | |
RunProfileId |
int |
Yes (ById, ByName) | The Run Profile to delete. | |
InputObject |
PSCustomObject |
Yes (ByInputObject) | The Run Profile to delete, as Get-JIMRunProfile returns it. Accepts pipeline input. |
|
Force |
switch |
No | Suppresses the confirmation prompt. | |
PassThru |
switch |
No | Returns the deleted Run Profile. |
Output¶
With -PassThru, the deleted Run Profile, as it was before the deletion; otherwise nothing.
Properties as under Get-JIMRunProfile.
Examples¶
Remove-JIMRunProfile -ConnectedSystemName "Contoso AD" -RunProfileId 42 -Force
Get-JIMRunProfile -ConnectedSystemId 1 -Name "Test Profile" | Remove-JIMRunProfile -Force
Get-JIMRunProfile -ConnectedSystemId 1 | Remove-JIMRunProfile -Force
$deleted = Remove-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -Force -PassThru
Write-Host "Removed Run Profile: $($deleted.Name)"
Start-JIMRunProfile¶
Queues a Run Profile for execution on the JIM worker service. The operation is asynchronous by default; use -Wait to block until execution completes.
Every parameter set requires both a Connected System identifier (-ConnectedSystemId or -ConnectedSystemName) and a Run Profile identifier (-RunProfileId or -RunProfileName); a Run Profile identifier alone does not resolve to a parameter set.
Syntax¶
# ById (default)
Start-JIMRunProfile -ConnectedSystemId <int> -RunProfileId <int> [-Wait] [-Timeout <int>] [-PreviewActivityId <guid>] [-PassThru]
# ByIdAndName
Start-JIMRunProfile -ConnectedSystemId <int> -RunProfileName <string> [-Wait] [-Timeout <int>] [-PreviewActivityId <guid>] [-PassThru]
# ByNameAndId
Start-JIMRunProfile -ConnectedSystemName <string> -RunProfileId <int> [-Wait] [-Timeout <int>] [-PreviewActivityId <guid>] [-PassThru]
# ByName
Start-JIMRunProfile -ConnectedSystemName <string> -RunProfileName <string> [-Wait] [-Timeout <int>] [-PreviewActivityId <guid>] [-PassThru]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ConnectedSystemId |
int |
Yes (ById, ByIdAndName) | The Connected System the Run Profile belongs to. Accepts pipeline input by property name. | |
ConnectedSystemName |
string |
Yes (ByNameAndId, ByName) | The name of the Connected System the Run Profile belongs to. Must be an exact match. | |
RunProfileId |
int |
Yes (ById, ByNameAndId) | The Run Profile to execute. Accepts pipeline input by property name, RunProfileId or Id. |
|
RunProfileName |
string |
Yes (ByIdAndName, ByName) | The name of the Run Profile to execute. Must be an exact match. | |
Wait |
switch |
No | Waits for the execution to finish, showing its progress: the step it is on, object counts, throughput and the estimated time remaining. | |
Timeout |
int |
No | How many seconds -Wait waits before it throws an error naming the Activity, which may still be running. Omit it to wait until the execution finishes. At least 1. |
|
PreviewActivityId |
guid |
No | The Full Synchronisation preview this run was started after reading, recorded on the run's Activity so that it shows what informed the run. Only a Full Synchronisation Run Profile can cite one, and it must be a completed Full Synchronisation preview of the same Connected System; anything else is refused and the run is not queued. A preview that a later run or configuration change has overtaken is still recorded, and the cmdlet warns what overtook it. | |
PassThru |
switch |
No | Returns the response to queuing the run. |
Output¶
With -PassThru, the response to queuing the run; Get-JIMActivity -Follow follows its ActivityId. Otherwise nothing. Warnings in the response are also written as PowerShell warnings.
| Property | Type | Description |
|---|---|---|
ActivityId |
guid |
The Activity that records the execution, and reports its progress and outcome. |
TaskId |
guid |
The worker task queued to carry out the execution. |
Message |
string |
Message describing the result. |
Warnings |
string[] |
Warnings about the execution, such as a partition validation warning, or that the preview it cites was out of date. Empty when there are none. |
Examples¶
Start-JIMRunProfile -ConnectedSystemName "Active Directory" -RunProfileName "Full Import"
$preview = New-JIMConfigurationChangePreview -ConnectedSystemId 1 -FullSynchronisation -Wait
$preview.ImpactCounts | Format-Table TransitionType, ObjectCount
if ($preview.IsComplete) {
Start-JIMRunProfile -ConnectedSystemId 1 -RunProfileName "Full Synchronisation" -PreviewActivityId $preview.ActivityId -Wait
}
$result = Start-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -PassThru
Write-Host "Activity ID: $($result.ActivityId)"
Write-Host "Task ID: $($result.TaskId)"
if ($result.Warnings.Count -gt 0) {
Write-Warning "Warnings: $($result.Warnings -join '; ')"
}
Get-JIMRunProfile -ConnectedSystemId 1 |
Where-Object { $_.RunType -eq "FullImport" } |
Start-JIMRunProfile -Wait
try {
Start-JIMRunProfile -ConnectedSystemId 1 -RunProfileId 42 -Wait -Timeout 600 -PassThru -ErrorAction Stop
} catch {
Write-Error "Run Profile execution failed or timed out: $_"
}
Notes¶
- The Run Profile is queued as an asynchronous task on the JIM worker service. Without
-Wait, the cmdlet returns immediately after the task is queued. - When
-Waitis specified, the cmdlet polls the lightweight Activity progress endpoint (/activities/{id}/progress) every 2 seconds and displays a progress bar with the current phase, object counts, throughput and estimated time remaining. If authentication tokens expire during polling, the cmdlet retries up to 3 times before failing. - If
-Timeoutis exceeded, the cmdlet throws a terminating error that includes the Activity ID, allowing you to check progress manually via Get-JIMActivity or the JIM web interface. - Starting a Run Profile while other work is running or queued is not refused: the run joins the Worker's queue and starts when the work ahead of it has finished, one run at a time. You do not need to check for running Run Profiles first, but with
-Waitthe time spent queued counts towards-Timeout.
See also¶
- Run Profiles: what Run Profiles are, run types, and how they fit alongside schedules and activities
- Activities: cmdlets for monitoring and inspecting activity execution history
- Connected Systems: cmdlets for managing Connected Systems