Get-VPASDiscoveredAccounts


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

GET DISCOVERED ACCOUNTS


Description:

USE THIS FUNCTION TO GET DISCOVERED ACCOUNTS IN THE PENDING SAFE LIST


Syntax:

Get-VPASDiscoveredAccounts [-SearchQuery] <String> [[-PlatformType] <String>] [[-Privileged] <String>] [[-Enabled] <String>] [[-token] <Hashtable>] [<CommonParameters>]


Parameters:

-SearchQuery <String>
Search string to find target resource via username, address, safe, platform, etc.
Comma separated for multiple fields, or to search all pass a blank value like so: " "

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

-PlatformType <String>
Limit the scope of accounts returned based on PlatformType
Possible values: Windows Server Local, Windows Desktop Local, Windows Domain, Unix, Unix SSH Key, AWS, AWS Access Keys, Azure Password Management

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

-Privileged <String>
Limit the scope of accounts returned based on Privileged status
Possible values: true, false

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

-Enabled <String>
Limit the scope of accounts returned based in account status
Possible values: true, false

Required: false
Position: 4
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: 5
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:

$DiscoveredAccountsJSON = Get-VPASDiscoveredAccounts -SearchQuery {SEARCHQUERY VALUE}


Outputs:

If successful:
{
         "count": 1,
         "value": [
                 {
                         "id": "19_15",
                         "name": "vman.com-vmanda-aa06b546-f19d-4716-a89b-d3bedfbb6858",
                         "userName": "vmanda",
                         "address": "vman.com",
                         "discoveryDateTime": 1724216092,
                         "accountEnabled": true,
                         "osGroups": "Administrators, Remote Desktop Users",
                         "platformType": "Windows Domain",
                         "domain": "vman.com",
                         "lastLogonDateTime": 1724213492,
                         "lastPasswordSetDateTime": 1718764060,
                         "passwordNeverExpires": true,
                         "osVersion": "Windows Server 2022 Standard Evaluation",
                         "privileged": true,
                         "userDisplayName": "vmanda",
                         "passwordExpirationDateTime": 0,
                         "osFamily": "Server",
                         "organizationalUnit": "CN=vmanda,CN=Users,DC=vman,DC=com",
                 "additionalProperties": "@{AccountType=Domain; CreationMethod=AutoDetected}",
                 "platformTypeAccountProperties": "@{SID=S-1-5-21-859712872-1750767134-752027284-1104}",
                         "numberOfDependencies": 0
                 }
         ]
}

$false if failed