This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

finding an attribute from within a scheduled workflow with powershell - msds-userpasswordexpirytimecomputed

Hi, 

I'm working on a password expiry notification, using ARS 7.0 workflow interface.

First, I use a find activity to scope certain users.

Then, I'd like to use an if-then branch, to evaluate the msds-userpasswordexpirytimecomputed property.

From what I've read, this value is a number that can't be evaluated by the "workflow computed" date and time.

I found this in the community that does essentially what I'm looking for in an even-driven workflow:

function onpremodify($Request)
{
$integerDate = $Request.Get('expires')
$convertedDate = [datetime]::fromfiletime($integerDate)
return $convertedDate
}

Except I'm trying to convert the msds-userpasswordexpirytimecomputed value.

That would (if it worked) convert the property to a text value, that can be evaluated by the workflow computed date.

However, I can't seem to find logic that actually returns meaningful data to the workflow. This code just returns an error: "Object reference not set to an instance of an object"

Though I've tried several iterations of function name, $Reference and $Dirobj, can't seem to return a usable value to the workflow.

Is this do-able?

Thanks so much for any thoughts.

 

Parents
  • Let me elaborate a bit on this.

    You can use a script activity to get your list of users based on whatever expiration criteria you like.

    You can then pass the list of users to another activity - an Update, or Deprovision etc.

    All you have to do is return the user list as the last line of your script - for example:

    $ReturnedUsers

    ...much like you would do for a function. The next activity in the workflow can then "pick this up" and act on the list.
Reply
  • Let me elaborate a bit on this.

    You can use a script activity to get your list of users based on whatever expiration criteria you like.

    You can then pass the list of users to another activity - an Update, or Deprovision etc.

    All you have to do is return the user list as the last line of your script - for example:

    $ReturnedUsers

    ...much like you would do for a function. The next activity in the workflow can then "pick this up" and act on the list.
Children
No Data