I have a scheduled workflow that filters users based on a VA and then searches for users with this VA in a specific OU and then runs some PowerShell scripts for various things.
I've used both of the commands below but neither seems to work, so i guess my question is how do I refer to "workflow Saved object properties" for multiple users without needing a For Each?
Script 1: $useremail = $workflow.SavedObjectProperties("searchforobjects").get("mail")
Error: At line: 11 char:5. Exception calling "SavedObjectProperties" with "1" argument(s): "The given key was not present in the dictionary."
Script 2: $useremail = $workflow.FoundObject("searchforobjects").get("mail")
Error: At line: 8 char:5. Exception calling "Get" with "1" argument(s): "Object reference not set to an instance of an object."