Last active
August 7, 2018 17:42
-
-
Save secpg/b1ee30e4b832f2a23c53fd3514b716cf to your computer and use it in GitHub Desktop.
CyberArk CCP - This script will perform a GET Password call to the CCP using client certificate authentication. It assumes that the certificate has been previously imported into the machines cert store.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### #### | |
| ## ## | |
| # This script will call the CCP using client certificate authentication # | |
| # Pulls the cert from the local user/personal store. No PW needed # | |
| ## ## | |
| #### #### | |
| # Declare Variables | |
| $BASEURL="___" #example: "https://pvwa.cyberark.com" | |
| $SAFE="___" #CyberArk Safe name | |
| $APPID="___" #CyberArk Application ID | |
| $FOLDER="Root" #CyberArk Safe Folder - Default=Root | |
| $OBJECT="___" #CyberArk object "Name" | |
| $THUMBPRINT="___" #CA certificate "Thumbprint" value in cert details | |
| # Call the CCP | |
| Invoke-RestMethod -Uri "$BASEURL/AIMWebService/api/Accounts?AppID=$APPID&Safe=$SAFE&Folder=$FOLDER&Object=$OBJECT" -Method Get -CertificateThumbprint $THUMBPRINT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment