How to launch PowerShell after password rotation?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

How to launch PowerShell after password rotation?

L4 Transporter

Hello,

The documentation for creating a custom plugin to launch a PowerShell script is woefully deficient in necessary steps.

 

The requirement I have is to launch a PowerShell script upon successful Change or Reconcile of a managed account.

The plugin Generator utility is inadequate for this task.

 

If I copy one of the Dependent platforms and associate the platform as a usage in another then I can see the platform as a usage tab in Account properties using the classic view, but I don't see a way to link the script in that tab. I do have populated process and prompt ini files associated with the dependent platform and they are in the bin folder.

 

It seems like I'm missing some linkage or vital information to launch the script after a password change.

 

I have seen references to copying one of the Service Account platforms that uses CyberArk.TPC.exe but I'm not finding any in our 14.2.x environment.

I also duplicated a Unix SSH platform and changed its type to Usage using the drop-down selector, but it doesn't show up as a Dependent platform.

 

Does anyone have a step by step document describing how to launch a PowerShell script after a change or reconcile operation that can be shared?

 

Update - the primary account is an Active Directory managed account

1 accepted solution

Accepted Solutions

Hello,

The steps I followed:

  • Duplicated a Windows Domain with LDAP platform to manage a domain account.
    • Onboarded the domain account and tested password rotation.
  • Duplicated a Windows Service platform from Service Dependent platforms.
    • Edited the Windows Service platform with removal of the existing dll and adding CyberArk.TPC.exe as the executable.
    • Added Additional Policy Settings and in there configured the bin\your_Custom_Process.ini and bin\your_Custom_Prompts.ini to match what will be placed in the CPM bin folder.
  • Added the custom process and prompts ini files to the CPM bin folder.
  • Edited the Windows Domain with LDAP duplicated platform, under Usages, add a new usage and the name will be the name of the duplicated Windows Service duplicated platform.
  • Edit the domain account in Classic View and select Add under the tab with the name of the new service dependency.
    • Enter a name for the service. The name can be anything you want and is not related to an actual running service.
    • Enter localhost for the address.
    • Select the box next to Restart Service and select No in the drop-down.

 

In my particular setup the process ini will launch the PowerShell script and the prompts ini is configured with the success or failure codes from the PowerShell script.

 

Now when the domain account password is rotated the service dependency is triggered which launches the PowerShell script via the process ini linked to the service dependent platform.

 

Notes - for the dependency you should duplicate a Dependent platform. Use the Administration--Platform Management link vs the Administration--Configuration Options--Platform Management link. Choose the Dependents tab.

Although you can change the Policy Type of platforms using the drop-down option to Usage from Regular, it actually doesn't change the base type, target platform vs service platform.

 

View solution in original post

2 REPLIES 2

L4 Transporter

Hello,

The missing piece was adding data for the dependency. Meaning I successfully linked the dependent platform but did not add anything for the dependency. Because I used a Windows Service account dependent platform to duplicate, I needed to add something for the service and that did not have to be an actual service, just something to link as a dependency in order to be able to leverage the process and prompt ini files. Fake name for the service, localhost as the address and No for Restart Service is what was used for the dependency.

 

I'll update this thread with the actual steps followed to successfully launch a PowerShell script after a reconcile or change operation on an Active Directory managed account.

Hello,

The steps I followed:

  • Duplicated a Windows Domain with LDAP platform to manage a domain account.
    • Onboarded the domain account and tested password rotation.
  • Duplicated a Windows Service platform from Service Dependent platforms.
    • Edited the Windows Service platform with removal of the existing dll and adding CyberArk.TPC.exe as the executable.
    • Added Additional Policy Settings and in there configured the bin\your_Custom_Process.ini and bin\your_Custom_Prompts.ini to match what will be placed in the CPM bin folder.
  • Added the custom process and prompts ini files to the CPM bin folder.
  • Edited the Windows Domain with LDAP duplicated platform, under Usages, add a new usage and the name will be the name of the duplicated Windows Service duplicated platform.
  • Edit the domain account in Classic View and select Add under the tab with the name of the new service dependency.
    • Enter a name for the service. The name can be anything you want and is not related to an actual running service.
    • Enter localhost for the address.
    • Select the box next to Restart Service and select No in the drop-down.

 

In my particular setup the process ini will launch the PowerShell script and the prompts ini is configured with the success or failure codes from the PowerShell script.

 

Now when the domain account password is rotated the service dependency is triggered which launches the PowerShell script via the process ini linked to the service dependent platform.

 

Notes - for the dependency you should duplicate a Dependent platform. Use the Administration--Platform Management link vs the Administration--Configuration Options--Platform Management link. Choose the Dependents tab.

Although you can change the Policy Type of platforms using the drop-down option to Usage from Regular, it actually doesn't change the base type, target platform vs service platform.

 

  • 1 accepted solution
  • 79 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!