Hello,
I have been trying to get some script conditions written for an automated workflow and am having some issues. I have seen the example in the SDK that demonstrates how to insert a script condition into an If-Else branch, but it either doesn't work or it's not being implemented properly. What is the proper way to pass objects that have been found in a Search box to an If-Else branch?
I can see that the script is immediately exiting on the first condition which is to check if the $DirObj.Class is a user or not. The script is not seeing that the objects are users. When I output the $DirObj.Class to the event log it is indicating that it is "edsAutomationWorkflowDefinition".
What I am ultimately looking to accomplish is to search AD for users passwords that haven't been set in the past 105 days. This is very easy to do with the built-in Search function. However, I want to be able to filter out some users if they are in certain OU's, so I have created a PowerShell script that is to analyze the DN of the in-process user and return $True or $False if the DN meets certain conditions.
So, I have a feeling that if I can properly pass the found user object to the If-Else branch, this will work. Thank you for any guidance. I have included a screen shot of my envisioned workflow.