AD Account expiration date from custom powershell activity

VivekSattanatha
Mega Sage
Mega Sage

Hi All

Anyone able to set account expiration date from Orchestration? We are trying to set it from custom PowerShell activity but it is not working. Please find the below command we used.

find_real_file.png

Our Target host is MID Server, AD server and MID server both are on the same network. Even though the commands are not working, the activity is running for a long time without showing any error or success. I had to cancel the activity all the time. Do you find any issue in this command?

bawiskar

Regards,

Vivek

1 ACCEPTED SOLUTION

Hi All,



The issue is resolved now. I tried running MID Server service with the Credential which I am using in ServiceNow. After that, it worked.



Regards,


Vivek


View solution in original post

10 REPLIES 10

Hi David,



I am using Administrator credential so I am not sure it is a permission issue. In fact, I can able run these command directly from Powershell. It is not working from ServiceNow only.



Regards,


Vivek


A quick search on "PowerShell error 8344" uncovers quite a number of articles on permissions issues.   For example:



https://blog.kloud.com.au/2015/12/03/connected-data-source-error-code-8344-insufficient-access-right...



Have you tried running a different, more simpler, PowerShell command to confirm the account can perform PowerShell operations okay?


Thanks David,



I will try this out and let you know.



Regards,


Vivek


Hi All,



The issue is resolved now. I tried running MID Server service with the Credential which I am using in ServiceNow. After that, it worked.



Regards,


Vivek


Hi Ankur,

I have tried this same commad and getting below error. Please help

 

saranyavs_2-1669118878587.png

 

saranyavs_1-1669118857018.png