Custom Script Usages to Execute After Password Change Tasks

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

Custom Script Usages to Execute After Password Change Tasks

L3 Networker

Trying to get a handle on custom usages as I need some things to execute after a password has changed. A lot of these are handled by existing usages (services, configs, scheduled tasks), but a few are very specific and not covered by out-of-the-box usages. I can easily write PowerShell scripts to do these tasks if they are passed the password, but am unsure how to configure a usage to launch a script.

 

I see in Usages where you can define a ScriptName and ScriptEngine, but am not sure what other requirements there are. Is there any documentation on this? I couldn't find any besides the generic CPM Plug-in info. Do I just place a script in with the CPM dlls and pass it parameters in the ScriptName field?

10 REPLIES 10

L6 Presenter

I had done this using the custom powershell.exe by CyberArk, using this you can write ur own Custom. Ps1 scripts with logic and they get executed. My scenario was to login to server and run specific scripts as usages. Try requesting this customer powershell.exe if you can get it then it's easy. We got it as CyberArk developed some other custom plugin for us and it was also using this custom powershell

L4 Transporter

I had done this using the custom powershell.exe by CyberArk, using this you can write ur own Custom. Ps1 scripts with logic and they get executed. My scenario was to login to server and run specific scripts as usages. Try requesting this customer powershell.exe if you can get it then it's easy. We got it as CyberArk developed some other custom plugin for us and it was also using this custom powershell

L3 Networker

Where did you find this custom powershell.exe usage?

L3 Networker

Ask your Cyberark representative for it and they should be able to put it in your Secure File Exchange.

If you get it and have issues, let me know. I've mapped out mostly how it works as the documentation is not very precise.

Will do. Much appreciated

@David Drinkwater​ / @Ankush Agarwal​ 

Did you setup the custom powershell usage? I got the files from my Cyberark rep, but I am hitting an issue trying to run a simple powershell script to write to a log file. can you provide screenshots of how your usage is setup?

There's a configuration PDF they should provide with the usage that talks about how to create it (clone a ConfigText usage I believe?) and add some Addition Policy Settings (ChangeScript/PowershellArguments/ChangeArguments).

 

Two requirements I discovered (one documented, one undocumented) are:

·        CPM must have .NET 3.5

·        Usage’s Vault name MUST be 130 characters or less. (This is an insidious problem, because the error code is generic when it occurs. Your usage name can reach 130 pretty easily if you are using FQDNs.)

 

The parameters (Change Arguments) I found passable are below:

-Account %masterpass\username%

-OldPassword %pmpass% 

-NewPassword %pmnewpass%

-UsageLogonUser %extrapass1\username%

-UsageLogonPass %pmextrapass1%

-UsageLogOnTo %extrapass1\logondomain%

-UsageAddress %address%

-UsageName %username%

-FilePath %filepath%

-Port %port%

-PasswordRegex %passwordregex%

 

Forbidden characters I blacklisted in passwords because they caused issues (some of these might work and certain ones, like $ only caused an issue when they were next to other special characters):

/<>"=;$

L1 Bithead

Hi All,

 

To add clarity, while you certainly can get this PowerShell script usage from your CyberArk representatives, there's another piece of information that is crucial to understand:

 

The PowerShell usage that was provided was a Controlled Availability (CA) plugin that was originally developed for another customer. Because it was developed for another customer, this does NOT guarantee that it will work in its fashion for your environment and does not warrant support - meaning if you open a case with CyberArk support, you most likely won't get a whole lot of help. If you want to test it out, then definitely discuss with your CyberArk rep to see if its worth the while. However, if you want this plugin to be fully supported, you'll have to go the route of our Extensions team by completing a plugin request form that your CyberArk representative can provide. This can and will likely incur a cost to be fully supported.

 

Hope this helps!

L3 Networker

Even I have created Power shall script (Plugin) to change the password using curl commend, received the error as per the screenshot I not sure I am missing something for configuration have used unix for ssh platform but no luck, would be appreciated incase any one can assist on it. Field_Content_versions_oct20__068Vy000018l0yjIAA.pngReceived attached repeated error,

powershall.exe is the by default in windows system , right or do we need any additional exe by cyberark?

  • 2143 Views
  • 10 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!