Add-VPASAccount


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

CREATE ACCOUNT


Description:

USE THIS FUNCTION TO CREATE A NEW ACCOUNT IN CYBERARK


Syntax:

Add-VPASAccount -platformID <String> -safeName <String> [-accessRestrictedToRemoteMachines <String>] [-remoteMachines <String>] [-automaticManagementEnabled <String>] [-manualManagementReason <String>] [-extraProps <Hashtable>] [-secretType <String>] [-name <String>] -address <String> -username <String> [-secret <String>] [-token <Hashtable>]

[<CommonParameters>]

Add-VPASAccount -InputParameters <Hashtable> [-token <Hashtable>] [<CommonParameters>]


Parameters:

-platformID <String>
PlatformID that will be assigned to the new account

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

-safeName <String>
SafeName that will be assigned to the new account

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

-accessRestrictedToRemoteMachines <String>
Limit if the new account can only connect to specific remote machines
Possible values: TRUE, FALSE

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

-remoteMachines <String>
Specific remote machines that the new account can connect to

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

-automaticManagementEnabled <String>
Enable for the account to be automatically managed by the CPM depending on platform settings and configurations
Possible values: TRUE, FALSE

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

-manualManagementReason <String>
Specify a reason for automatic management to be disabled

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

-extraProps <Hashtable>
Include extra properties that can be defined based on platform settings and configurations
Pass extra properties in a hashtable following this pattern: @{ OptionalProperty1Tag = "OptionalProperty1Value" }
Oracle Example: -extraProps @{ Database = "VmanDB" }

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

-secretType <String>
Type of secret that will be assigned to the new account
Possible values: Password, Key

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

-name <String>
ObjectName that will be assigned to the new account

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

-address <String>
Address that will be assigned to the new account

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

-username <String>
Username that will be assigned to the new account

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

-secret <String>
Secret that will be assigned to the new account

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

-InputParameters <Hashtable>
HashTable of values containing the parameters required to make the API call

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

$CreateAccountJSON = Add-VPASAccount -platformID {PLATFORMID VALUE} -safeName {SAFENAME VALUE} -address {ADDRESS VALUE} -username {USERNAME VALUE}

$CreateAccountJSON = Add-VPASAccount -platformID {PLATFORMID VALUE} -safeName {SAFENAME VALUE} -address {ADDRESS VALUE} -username {USERNAME VALUE} -extraProps @{Database = "DatabaseName"; Port = "1234"}

$InputParameters = @{
        platformID = "TargetPlatform"
         safeName = "TargetSafeName"
         accessRestrictedToRemoteMachines = "TRUE"|"FALSE"
         automaticManagementEnabled = "TRUE"|"FALSE"
         manualManagementReason = "Reason to disable rotation"
         extraProps = @{
                 ExtraProperty1 = "ExtraProperty1Value"
                 ExtraProperty2 = "ExtraProperty2Value"
         }
         secretType = "Password"|"Key"
         address = "AddressHere"
         username = "UsernameHere"
         secret = "Cyberark1"
}
$CreateAccountJSON = Add-VPASAccount -InputParameters $InputParameters


Outputs:

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

$false if failed