Created
February 28, 2023 15:57
-
-
Save infamousjoeg/c32f0ea58aee48829afe40302d78cba3 to your computer and use it in GitHub Desktop.
Export Safe Members for all Safes in CyberArk PAM using psPAS PowerShell Module
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
# Before running this script, make sure psPAS is installed by running: | |
# Install-Module psPAS | |
Import-Module psPAS | |
$BaseURI = Read-Host "Enter the Base URL (e.g. https://pvwa.example.com)" | |
$Type = Read-Host "Enter the Authentication Type [cyberark], ldap, radius" | |
if (!$Type) { | |
$Type = "cyberark" | |
} | |
New-PASSession -BaseURI $BaseURI -Credential $(Get-Credential) -type $Type -concurrentSession $True | |
Get-PASSafe -extendedDetails $False | ForEach-Object {Get-PASSafeMember -SafeName $_.SafeName} | Export-Csv -Path "SafeMembers.csv" -Force -NoTypeInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment