Last active
August 7, 2018 17:42
-
-
Save secpg/b1ee30e4b832f2a23c53fd3514b716cf to your computer and use it in GitHub Desktop.
Revisions
-
secpg revised this gist
Aug 7, 2018 . 1 changed file with 9 additions and 11 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,17 @@ #### #### ## ## # 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 -
secpg created this gist
Aug 6, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #### #### ## ## # This script will call the CCP using client certificate authentication # # Pulls the cert from the local machine/personal store. No PW needed # ## ## #### #### # Declare Variables $BASEURL="____" $APPID="____" $SAFE="____" $FOLDER="____" $OBJECT="____" # Retrieve Certificate $CERT = Get-ChildItem -Path Cert:\LocalMachine\My\<cert thumbprint> # Call the CCP Invoke-RestMethod -Uri "$BASEURL/AIMWebService/api/Accounts?AppID=$APPID&Safe=$SAFE&Folder=$FOLDER&Object=$OBJECT" -Method Get -CertificateThumbprint $CERT.Thumbprint