- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
05-02-2019 11:57 AM
Is there a method to delete hundreds of servers that has been decommission.
05-02-2019 01:01 PM
Hello @Emmanuel Asph Are there hundreds of servers (e.g. Windows server local Administrator accounts) decommissioned are on-boarded manually or using Auto-detection process?
If on boarded manually, On the bulk upload sheet, only list/populate 3 items:
Password_Name & SafeName should already be populated. Add a single unique text string in Comments i.e. For example <Decomm> and Run the bulk load. This will update the comment field for all of the servers (e.g. Windows server local Administrator accounts) in the file.
Now logon to PVWA> Search for comment (For example <Decomm>) > Bulk select and delete all the accounts.
You can also log in PrivateArk client > Open the safe that contains the all the servers (e.g. Windows server local Administrator accounts) and search for the comment i.e. For example <Decomm> and delete them. It is more easy to delete from Private-Ark client too.
If you have used Auto detection process to on-board hundreds of servers (e.g. Windows server local Administrator accounts), Every time auto-detection process runs, CPM compares the accounts in target safe to servers in AD. so if the servers (e.g. Windows server local Administrator accounts) exists in safe but does not exist in AD (i.e. disabled or removed from AD) then CPM will automatically delete the servers (e.g. Windows server local Administrator accounts) from the safe.
Hope this helps.
Thanks,
Nikhil Reddy
05-02-2019 01:37 PM
You can use pacli or rest api to do it, write a script which takes data from an input file and deletes them.
05-02-2019 01:37 PM
You can use pacli or rest api to do it, write a script which takes data from an input file and deletes them.
06-04-2019 02:55 PM
@Ankush Agarwal REST API works great, using power shell script from input file.
09-16-2019 12:44 PM
With REST, there seems to be limit to how many IDs you can return at once. For example, if a decommed machine had 10 managed accounts, how do I get all the unique IDs to populate the -AccountID parameter?
09-16-2019 12:57 PM
With this method: https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/SDK/GetAccounts.htm
By default only 50 results are returned, but the `limit` & `offset` parameters can be used to fetch more accounts.
06-17-2022 08:52 AM
I dont think the Auto detction method would delete the accounts from the safe , it just onboards it .
06-17-2022 08:53 AM
Tried it but Remove-PASAccount and Invoke-pasCPMoperation doesnt work.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

