Last active
May 23, 2022 20:59
-
-
Save ryanvgates/cf88ae9417454e05aabeef496c6524c5 to your computer and use it in GitHub Desktop.
PowerShell CyberArk Get Account
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
Write-Host "$((get-date).ToString()) - Attempting to retrieve account $username on platform $platformID, address $Address in safe $Safename on $CyberArkHost" | |
$Account_URI = "https://$CyberArkHost/PasswordVault/api/Accounts?search=$username $platformID $Safename" | |
$AccountHeader = @{'accept'='application/json';'content-type'='application/json';'Authorization'=$Token} | |
$getAccountResponse = Invoke-WebRequest -Uri $Account_URI -Method GET -Body $Account_Body -Headers $AccountHeader -UseBasicParsing | |
return $getAccountResponse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment