Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2018 19:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
A script that checks if Requests to the FIMService are still in PostProcessing mode.
Script that waits for WF triggered by requests.
Used in Schedules to get dynamic sleep time before importing results after export to FIM Service.
Default Creator is Built-in Synchronization Account.
Requires the LithnetRMA PowerShell module from
[string]$Creator = 'fb89aefa-5ea1-47f1-8890-abe7797d6497',
[string]$FIMServiceURI = "",
[int]$RetryInterval = 5
#region Lithnet
if(!(Get-Module -Name LithnetRMA)){Import-Module LithnetRMA}
Set-ResourceManagementClient -BaseAddress $FIMServiceURI;
#endregion Litnet
$Running = Search-Resources -xPath "/Request[Creator='$Creator' and RequestStatus='PostProcessing']"
Start-Sleep -Seconds $RetryInterval
$Running = Search-Resources -XPath "/Request[Creator='$Creator' and RequestStatus='PostProcessing']"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment