Set accountExpires attribute in Active Directory

Sachin Pratap 2
Kilo Expert

For user account, I have account Expires date on RITM.

Using Orchestration, how can I set accountExpires attribute in Active Directory.

4 REPLIES 4

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

please check the solution provided to the below thread, it should fit your need:

https://community.servicenow.com/community?id=community_question&sys_id=b704cbe5dbd8dbc01dcaf3231f96...

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

Hi Alberto,

 

I have gone through the link,  and I am new to Powershell scripting.

So, can you suggest me what is the command written and how it is constructed.

 

 

Thanks,

Sachin Chuahan

Harsh Vardhan
Giga Patron

i am assuming here you have used "Update AD Object" activities in your workflow. 

 

first save the value of account Expires date  in workflow scratchpad and then you can use that in object data field .

 

workflow.scratchpad.acnt =current.variable.account_expires_date   // make sure the variable name is correct. 

 

you just need to set the value in object data field. 

 

 

{"accountExpires" : "workflow.scratchpad.acnt "}

 

i am adding doc link here kindly refer that "Update user data" part in the doc. 

Update Active Directory with Orchestration

 

Hi Harshvardhan,

 

When I am updating AD using "Update AD Object" object, activity is going to failure path. Please see error message.

find_real_file.png