0
Answered

Powershell Connector continuing to run script after MIM says run is complete

Tom Parker 1 week ago in PowerShell connector • updated by Bob Bradley 1 week ago 4

It looks like a Powershell MA's script is continuing to run well after the MA in MIM says the run has been completed. Is this a known thing which happens or is intended or is it a bug?

UNIFY Broker Version: v5.1.0 Revision #2
MIM Version 4.4.17849.0

AddUser powershell code: D:\ADProvisioning.Powershell\UserAdd.ps1

Note: The code was previously "& D:\ADProvisioning.Powershell\UserAdd.ps1" but I changed it because I didn't understand the intent of running it as a separate process and to simplify the problem solving process. The issue still occurred when


Before running the export:

No log in file explorer yet for the AD Provisioning Export.

After running the export

All the errors are ma-extension-error, which may be genuine as the script I'm writing is still being worked on.

Here's the number of users steadily increasing

Here's the export log continuing to be updated after the run has been finished.



I can make the script I'm running available on request.

Affected Versions:
Fixed by Version:

Answer

Answer
Answered

The issue turned out to be that the MIM Agent is timing out. Please see https://voice.unifysolutions.net/knowledge-bases/7/articles/3364-unifybrokermicrosoft-identity-manager-configuration for details on configuring the timeout. Please note in particular that bulk exports use only a single request per page (the Page Size setting), so you will need to either decrease the page size, increase the timeout, or improve the performance of the PowerShell script.

GOOD, I'M SATISFIED
Satisfaction mark by Tom Parker 1 week ago
Under review

Hi Tom,

Are the users that continue to be provisioned correct? This is not a feature of the PowerShell connector, so I would definitely need to see the script to be able to comment - my initial suspicion is that the script is triggering something out-of-process.

The users are being created correctly.

I would have thought so as well, but the main section of the script, which contains the logging, is what's lagging after the run finishes.

Is there still a problem if you disable logging, Tom?  I can't recall, but I think there's a switch for that ... basically there should only be an interactive output if you run the script with -Debug $true ... test this in the PS ISE running as the IdB identity ...

Answer
Answered

The issue turned out to be that the MIM Agent is timing out. Please see https://voice.unifysolutions.net/knowledge-bases/7/articles/3364-unifybrokermicrosoft-identity-manager-configuration for details on configuring the timeout. Please note in particular that bulk exports use only a single request per page (the Page Size setting), so you will need to either decrease the page size, increase the timeout, or improve the performance of the PowerShell script.