Get-VPASDPAPolicies


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

GET DPA POLICIES


Description:

USE THIS FUNCTION TO RETRIEVE POLICIES FROM DPA VIA SEARCH QUERY


Syntax:

Get-VPASDPAPolicies [-SearchQuery] <String> [[-token] <Hashtable>] [<CommonParameters>]


Parameters:

-SearchQuery <String>
Search string to find target resource

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

$TargetPolicies = Get-VPASDPAPolicies -SearchQuery {SEARCH QUERY VALUE}


Outputs:

If successful:
{
         "value": [
                 {
                         "policyId": "lkjsdhf897-zxcv-asdf-7634-lksjd438754",
                         "status": "Enabled",
                         "policyName": "Vman Access Policy",
                         "description": "",
                         "updatedOn": "2024-03-21 14:21:27.572710",
                         "ruleNames": "Test Rule",
                         "platforms": "OnPrem"
                 }
         ]
}

$false if failed