Run Profiles¶
Run profile cmdlets manage and execute synchronisation run profiles on connected systems. A run profile defines a specific operation type (import, sync, or export) that can be executed against a connected system. Use these cmdlets to list, create, modify, remove, and trigger run profiles.
Get-JIMRunProfile¶
Retrieves one or more run profiles from a connected system, either by connected system or by run profile ID.
Syntax¶
# By connected system ID (default)
Get-JIMRunProfile -ConnectedSystemId <int> [-Name <string>]
# By connected system name
Get-JIMRunProfile -ConnectedSystemName <string> [-Name <string>]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ConnectedSystemId |
int |
Yes (ById set) | ID of the connected system. Alias: Id. Accepts pipeline input by property name. |
|
ConnectedSystemName |
string |
Yes (ByName set) | Name of the connected system. Must be an exact match. | |
Name |
string |
No | Filter run profiles by name. Supports wildcards (e.g., "Full*"). |
Output¶
Returns one or more PSCustomObject instances representing run profiles, each containing properties such as Id, Name, Type, ConnectedSystemId, and PartitionId.
Examples¶
Get-JIMConnectedSystem -Name "Active Directory" | Get-JIMRunProfile
New-JIMRunProfile¶
Creates a new run profile on a connected system. Supports ShouldProcess; use -WhatIf or -Confirm to preview or confirm the operation.
Syntax¶
# By connected system ID (default)
New-JIMRunProfile -ConnectedSystemId <int> -Name <string> -Type <string> [-PartitionId <int>] [-PassThru] [-WhatIf] [-Confirm]
# By connected system name
New-JIMRunProfile -ConnectedSystemName <string> -Name <string> -Type <string> [-PartitionId <int>] [-PassThru] [-WhatIf] [-Confirm]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
ConnectedSystemId |
int |
Yes (ById set) | ID of the connected system to create the run profile on. | |
ConnectedSystemName |
string |
Yes (ByName set) | Name of the connected system to create the run profile on. | |
Name |
string |
Yes (Position 0) | Display name for the new run profile. | |
Type |
string |
Yes | Operation type. Valid values: FullImport, DeltaImport, FullSync, DeltaSync, Export. |
|
PartitionId |
int |
No | Optional partition to scope this run profile to. If omitted, the run profile applies to the default partition. | |
PassThru |
switch |
No | $false |
Returns the created run profile object to the pipeline. |
Output¶
By default, no output. When -PassThru is specified, returns the created run profile object.
Examples¶
New-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import" -Type FullImport
New-JIMRunProfile -ConnectedSystemName "Active Directory" -Name "Delta Sync" -Type DeltaSync
$rp = New-JIMRunProfile -ConnectedSystemId 1 -Name "Export" -Type Export -PassThru
$rp.Id
New-JIMRunProfile -ConnectedSystemId 1 -Name "Full Import (UK)" -Type FullImport -PartitionId 3
New-JIMRunProfile -ConnectedSystemId 1 -Name "Delta Import" -Type DeltaImport -WhatIf
Set-JIMRunProfile¶
Modifies an existing run profile. Supports ShouldProcess; use -WhatIf or -Confirm to preview or confirm the operation.
Syntax¶
# By ID (default)
Set-JIMRunProfile -Id <int> [-Name <string>] [-PartitionId <int>] [-PassThru] [-WhatIf] [-Confirm]
# By input object
Set-JIMRunProfile -InputObject <PSCustomObject> [-Name <string>] [-PartitionId <int>] [-PassThru] [-WhatIf] [-Confirm]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Id |
int |
Yes (ById set) | ID of the run profile to modify. Accepts pipeline input by property name. | |
InputObject |
PSCustomObject |
Yes (ByInputObject set) | A run profile object, typically from Get-JIMRunProfile. Accepts pipeline input. |
|
Name |
string |
No | New display name for the run profile. | |
PartitionId |
int |
No | New partition ID to scope the run profile to. | |
PassThru |
switch |
No | $false |
Returns the updated run profile object to the pipeline. |
Output¶
By default, no output. When -PassThru is specified, returns the updated run profile object.
Examples¶
Get-JIMRunProfile -Id 42 | Set-JIMRunProfile -Name "Full Import (Renamed)" -PassThru
Remove-JIMRunProfile¶
Deletes a run profile. This is a destructive operation with high impact; by default, PowerShell will prompt for confirmation. Use -Force to suppress the confirmation prompt. Supports ShouldProcess.
Syntax¶
# By ID (default)
Remove-JIMRunProfile -Id <int> [-Force] [-PassThru] [-WhatIf] [-Confirm]
# By input object
Remove-JIMRunProfile -InputObject <PSCustomObject> [-Force] [-PassThru] [-WhatIf] [-Confirm]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Id |
int |
Yes (ById set) | ID of the run profile to delete. Accepts pipeline input by property name. | |
InputObject |
PSCustomObject |
Yes (ByInputObject set) | A run profile object, typically from Get-JIMRunProfile. Accepts pipeline input. |
|
Force |
switch |
No | $false |
Suppresses the confirmation prompt. |
PassThru |
switch |
No | $false |
Returns the deleted run profile object to the pipeline before removal. |
Output¶
By default, no output. When -PassThru is specified, returns the run profile object that was deleted.
Examples¶
Get-JIMRunProfile -ConnectedSystemId 1 | Remove-JIMRunProfile -Force
$deleted = Remove-JIMRunProfile -Id 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.
Syntax¶
# By run profile ID (default)
Start-JIMRunProfile -RunProfileId <int> [-Wait] [-Timeout <int>] [-PassThru]
# By run profile name and connected system name
Start-JIMRunProfile -ConnectedSystemName <string> -RunProfileName <string> [-Wait] [-Timeout <int>] [-PassThru]
# By run profile ID and connected system name
Start-JIMRunProfile -RunProfileId <int> -ConnectedSystemName <string> [-Wait] [-Timeout <int>] [-PassThru]
# By run profile name and connected system ID
Start-JIMRunProfile -ConnectedSystemId <int> -RunProfileName <string> [-Wait] [-Timeout <int>] [-PassThru]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
RunProfileId |
int |
Yes (ById, ByIdAndName sets) | ID of the run profile to execute. Alias: Id. |
|
RunProfileName |
string |
Yes (ByName, ByNameAndId sets) | Name of the run profile to execute. | |
ConnectedSystemId |
int |
Yes (ByNameAndId set) | ID of the connected system that owns the run profile. | |
ConnectedSystemName |
string |
Yes (ByName, ByIdAndName sets) | Name of the connected system that owns the run profile. | |
Wait |
switch |
No | $false |
Blocks until execution completes, displaying a progress indicator. Polls every 2 seconds. |
Timeout |
int |
No | Maximum number of seconds to wait when -Wait is specified. If exceeded, an error is thrown containing the activity ID for manual follow-up. |
|
PassThru |
switch |
No | $false |
Returns the execution response object to the pipeline. |
Output¶
By default, writes status messages to the host. When -PassThru is specified, returns a PSCustomObject with the following properties:
| Property | Type | Description |
|---|---|---|
ActivityId |
int |
ID of the activity created for tracking the execution |
TaskId |
string |
ID of the queued worker task |
Examples¶
Start-JIMRunProfile -ConnectedSystemName "Active Directory" -RunProfileName "Full Import"
$result = Start-JIMRunProfile -RunProfileId 42 -PassThru
Write-Host "Activity ID: $($result.ActivityId)"
Write-Host "Task ID: $($result.TaskId)"
Get-JIMRunProfile -ConnectedSystemId 1 |
Where-Object { $_.Type -eq "FullImport" } |
ForEach-Object { Start-JIMRunProfile -RunProfileId $_.Id -Wait }
try {
Start-JIMRunProfile -RunProfileId 42 -Wait -Timeout 600 -PassThru
} 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 activity status every 2 seconds and displays a progress bar. 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. - Run profiles that are already executing will be rejected by the server; you do not need to check for running profiles before calling this cmdlet.
See also¶
- API Run Profiles: REST API reference for run profile endpoints
- Activities: cmdlets for monitoring and inspecting activity execution history
- Connected Systems: cmdlets for managing connected systems