Get-VPASAllDiscoveredAccounts


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

GET ALL DISCOVERED ACCOUNTS


Description:

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


Syntax:

Get-VPASAllDiscoveredAccounts [[-token] <Hashtable>] [<CommonParameters>]


Parameters:

-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: 1
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:

$AllDiscoveredAccountsJSON = Get-VPASAllDiscoveredAccounts


Outputs:

If successful:
{
         "count": 12,
         "value": [
                 ...
                 {
                         "id": "19_13",
                         "name": "components.vman.com-PSMTestUser-468fa034-7bb4-4fbd-baeb-fce59e29077b",
                         "userName": "PSMTestUser",
                         "address": "components.vman.com",
                         "discoveryDateTime": 1724216091,
                         "accountEnabled": true,
                         "osGroups": "Administrators, Users",
                         "platformType": "Windows Server Local",
                         "domain": "vman.com",
                         "lastLogonDateTime": 1724215358,
                         "lastPasswordSetDateTime": 1722475482,
                         "passwordNeverExpires": true,
                         "osVersion": "Windows Server 2022 Standard Evaluation",
                         "privileged": true,
                         "userDisplayName": "PSMTestUser",
                         "passwordExpirationDateTime": 0,
                         "osFamily": "Server",
                         "organizationalUnit": "CN=COMPONENTS,CN=Computers,DC=vman,DC=com",
                 "additionalProperties": "@{AccountType=Local; CreationMethod=AutoDetected}",
                 "platformTypeAccountProperties": "@{SID=S-1-5-21-3557626459-4054859972-1988515847-1006}",
                         "numberOfDependencies": 0
                 },
                 {
                         "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