Update-VPASAccountFields


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

UPDATE ACCOUNT FIELDS


Description:

USE THIS FUNCTION TO UPDATE AN ACCOUNT FIELD FOR AN ACCOUNT IN CYBERARK


Syntax:

Update-VPASAccountFields [[-safe] <String>] [[-platform] <String>] [[-username] <String>] [[-address] <String>] [-action] <String> [-field] <String> [-fieldval] <String> [[-AcctID] <String>] [[-CustomField] <String>] [[-token] <Hashtable>] [<CommonParameters>]


Parameters:

-safe <String>
Safe name that will be used to query for the target account if no AcctID is passed

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

-platform <String>
PlatformID that will be used to query for the target account if no AcctID is passed

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

-username <String>
Username that will be used to query for the target account if no AcctID is passed

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

-address <String>
Address that will be used to query for the target account if no AcctID is passed

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

-action <String>
Which action will be taken on the updated fields
Possible values: Add, Remove, Replace

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

-field <String>
Define which field will be updated
Possible values: Name, Address, PlatformID, Username, Status, StatusReason, RemoteMachines, AccessRestrictedToRemoteMachines, LogonDomain

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

-fieldval <String>
Target value that will be used to update the target field

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

-AcctID <String>
Unique ID that maps to a single account, passing this variable will skip any query functions

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

-CustomField <String>
Target property tag that will be updated

Required: false
Position: 9
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: 10
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:

$UpdateAccountFieldsJSON = Update-VPASAccountFields -safe {SAFE VALUE} -username {USERNAME VALUE} -action {ACTION VALUE} -field {FIELD VALUE} -fieldval {FIELDVAL VALUE}


Outputs:

If successful:
{
         "categoryModificationTime": 1723869049,
         "platformId": "WinDomain",
         "safeName": "TestSafe",
         "id": "121_5",
         "name": "Operating System-WinDomain-vman.com-testdomainuser02",
         "address": "NewAddress.vman.com",
         "userName": "testdomainuser02",
         "secretType": "password",
         "secretManagement": {
                 "automaticManagementEnabled": true,
                 "lastModifiedTime": 1723780054
         },
         "createdTime": 1723780054
}

$false if failed