Update-VPASSafe


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

UPDATE SAFE


Description:

USE THIS FUNCTION TO UPDATE SAFE VALUES IN CYBERARK


Syntax:

Update-VPASSafe [-safe] <String> [-field] <String> [-fieldval] <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

-field <String>
Specify which field will be updated
Possible values: SafeName, Description, OLACEnabled, ManagingCPM, NumberOfVersionsRetention, NumberOfDaysRetention

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

-fieldval <String>
Target value to update the target field with

Required: true
Position: 3
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: 4
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:

$UpdateSafeJSON = Update-VPASSafe -safe {SAFE VALUE} -field {FIELD VALUE} -fieldval {FIELDVAL VALUE}


Outputs:

If successful:
{
         "safeUrlId": "NewSafeVpas",
         "safeName": "NewSafeVpas",
         "safeNumber": 133,
         "description": "Updated description for documentation",
         "location": "\\",
         "creator": {
                 "id": "8c904dd3-b9f1-4e02-b4b0-1234",
                 "name": "vman@cyberark.cloud.1234"
         },
         "olacEnabled": false,
         "managingCPM": "ISPSSConnector",
         "numberOfVersionsRetention": null,
         "numberOfDaysRetention": 7,
         "autoPurgeEnabled": false,
         "creationTime": 1723779203,
         "lastModificationTime": 1723869537064880
}

$false if failed