Get-VPASAllSafes


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

GET ALL CYBERARK SAFES


Description:

USE THIS FUNCTION TO RETRIEVE ALL SAFES


Syntax:

Get-VPASAllSafes [[-IncludeAccounts]] [[-token] <Hashtable>] [<CommonParameters>]


Parameters:

-IncludeAccounts [<SwitchParameter>]
Switch if to include accounts in the return value or not

Required: false
Position: 1
Default value: False
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-token <Hashtable>
HashTable of data containing various pieces of login information (PVWA, LoginToken, HeaderType, etc).
If -token is not passed, function will use last known hashtable generated by New-VPASToken

Required: false
Position: 2
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug
ErrorAction, ErrorVariable, WarningAction, WarningVariable
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216)


Examples:

$AllSafesJSON = Get-VPASAllSafes -IncludeAccounts


Outputs:

If successful:
{
         "count": 58,
         "value": [
                 ...
                 {
                         "safeNumber": 110,
                         "location": "\\",
                 "creator": "@{id=hdkljsahfd67438-1234-3546-bfgdf-fdsjkfh983457; name=vadim.melamed@vman.com}",
                         "olacEnabled": false,
                         "numberOfVersionsRetention": null,
                         "numberOfDaysRetention": 7,
                         "autoPurgeEnabled": false,
                         "creationTime": 1710944897,
                         "lastModificationTime": 1724115657400750,
                         "safeUrlId": "VpasModuleSafe1",
                         "safeName": "VpasModuleSafe1",
                         "description": "",
                         "managingCPM": "VmanCPM",
                         "isExpiredMember": false
                 },
                 {
                         "safeNumber": 111,
                         "location": "\\",
                 "creator": "@{id=sdhfkjsd-4234-5664-1234-ajkhd4568739; name=vadim.melamed@vman.com}",
                         "olacEnabled": false,
                         "numberOfVersionsRetention": null,
                         "numberOfDaysRetention": 7,
                         "autoPurgeEnabled": false,
                         "creationTime": 1710944920,
                         "lastModificationTime": 1724115657451067,
                         "safeUrlId": "VpasModuleSafe2",
                         "safeName": "VpasModuleSafe2",
                         "description": "",
                         "managingCPM": "VmanCPM",
                         "isExpiredMember": false
                 },
                 ...
         ]
}

$false if failed