Add-VPASSafe


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

CREATE SAFE


Description:

USE THIS FUNCTION TO CREATE A SAFE IN CYBERARK


Syntax:

Add-VPASSafe [-safe] <String> [[-passwordManager] <String>] [[-numberOfVersionsRetention] <Int32>] [[-numberOfDaysRetention] <Int32>] [[-OLACEnabled]] [[-Description] <String>] [[-token] <Hashtable>] [<CommonParameters>]


Parameters:

-safe <String>
Target unique safe name

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

-passwordManager <String>
Define which CPM will be assigned to the safe
A blank value or not passing a CPM will NOT assign a CPM to the safe

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

-numberOfVersionsRetention <Int32>
Define how many versions of passwords will be kept in an accounts history

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

-numberOfDaysRetention <Int32>
Define how many days worth of passwords will be kept in an accounts history

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

-OLACEnabled [<SwitchParameter>]
Define if to turn on OLAC (Object Level Access Control) for the safe

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

-Description <String>
An explanation/details of the target resource
Best practice states to leave informative descriptions to help identify the resource purpose

Required: false
Position: 6
Default value:
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: 7
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:

$CreateSafeJSON = Add-VPASSafe -safe {SAFE VALUE} -passwordManager {PASSWORDMANAGER VALUE} -OLACENabled -Description {DESCRIPTION VALUE}


Outputs:

If successful:
{
         "safeUrlId": "NewSafeVpas",
         "safeName": "NewSafeVpas",
         "safeNumber": 133,
         "description": "New safe for documentation purposes",
         "location": "\\",
         "creator": {
                 "id": "8c904dd3-b9f1-4e02-b4b0-8f314bb62f12",
                 "name": "vadim@vman.com"
         },
         "olacEnabled": false,
         "managingCPM": "ISPSSConnector",
         "numberOfVersionsRetention": null,
         "numberOfDaysRetention": 7,
         "autoPurgeEnabled": false,
         "creationTime": 1723779203,
         "lastModificationTime": 1723779197277627
}

$false if failed