Shared Services - Delete Users from Privilege Cloud
200
Created On 11/10/26 10:57 AM - Last Modified 11/10/26 15:56 PM
Objective
Download (DeleteUsers folder):
https://community.cyberark.com/marketplace/s/#a352J000000GWAZQA4-a392J000002tNgLQAU
Intro:
This script will help you delete local users in the vault in bulk.
Please be extra careful and triple check every action, deleting the wrong users can result in losing safe access.
Environment
14.6 Privilege Cloud;Identity
Procedure
Prerequisites:

9. The script will start running and deleting the users:

10 .If a user is not found, it will skip, if unable to delete it will skip aswell.
11. Finally the script will output 3 files:
- This is meant only for ISPSS customers.
- The machine you are running from has HTTPS/443 connectivity to the platform (eg https://mikeb.cyberark.cloud).
- User must be a Privilege Cloud Administrator.
See Example (marked in yellow the only required permissions):
- Do NOT use InstallerUser for this task.
- Make sure you extract the entire Priv cloud tools zip and keep the format.
- Prepare the .txt or .csv file containing a list of users you plan to delete, each line must contain a user, see example:
If you want to delete a single user, no problem, just create the text with a single user line in it.
How to Run:
- Navigate to Cyberark PrivilegeCloud Tools\DeleteUsers
- Run the script from powershell:
- .\DeleteUsersFromVault.ps1 -PortalURL https://<yourSubDomainHere>.cyberark.cloud
- The script will check if you have minimal permissions required to delete users.
- The script will prompt for a .txt or .csv file containing the users to delete
- Make sure you do a final inspection of the file before selecting it, physically open it and check what you are about to delete:
- Confirm the count the script sees that it's the correct amount of users you are about to delete:
Example:
9. The script will start running and deleting the users:
10 .If a user is not found, it will skip, if unable to delete it will skip aswell.
11. Finally the script will output 3 files:
Confirmed_Deleted_Users.txt
Failed_Delete.txt
Users_Not_Found.txt
Failed_Delete.txt
Users_Not_Found.txt
12. Reach out to CyberArk support in case of any issue and provide them as much information as possible, while they may not help you with the script itself, they can help with user deletion as a fallback step.