Get-VPASDPAPolicyDetails


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

GET DPA POLICY DETAILS


Description:

USE THIS FUNCTION TO RETRIEVE POLICY DETAILS FROM DPA


Syntax:

Get-VPASDPAPolicyDetails -PolicyID <String> [-token <Hashtable>] [<CommonParameters>]

Get-VPASDPAPolicyDetails -PolicyName <String> [-token <Hashtable>] [<CommonParameters>]

Get-VPASDPAPolicyDetails -InputParameters <Hashtable> [-token <Hashtable>] [<CommonParameters>]


Parameters:

-PolicyID <String>
UniqueID of the target policy in DPA

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

-PolicyName <String>
Unique name of the target policy in DPA

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

$PolicyDetails = Get-VPASDPAPolicyDetails -PolicyID {POLICY ID VALUE}

$PolicyDetails = Get-VPASDPAPolicyDetails -PolicyName {POLICY NAME VALUE}

$InputParameters = @{
        PolicyID = "lkjsdhf897-zxcv-asdf-7634-lksjd438754"
}
$PolicyDetails = Get-VPASDPAPolicyDetails -InputParameters $InputParameters

$InputParameters = @{
        PolicyName = "Vman Access Policy"
}
$PolicyDetails = Get-VPASDPAPolicyDetails -InputParameters $InputParameters


Outputs:

If successful:
{
         "policyId": "lkjsdhf897-zxcv-asdf-7634-lksjd438754",
         "policyName": "Vman Access Policy",
         "status": "Enabled",
         "description": "",
         "providersData": {
                 "OnPrem": {
                         "fqdnRules": "",
                         "logicalNames": null,
                         "ipRules": ""
                 }
         },
         "startDate": null,
         "endDate": null,
         "userAccessRules": [
                 {
                         "ruleName": "Test Rule",
         "userData": "@{roles=System.Object[]; groups=System.Object[]; users=System.Object[]}",
         "connectionInformation": "@{connectAs=; grantAccess=2; idleTime=15; daysOfWeek=System.Object[]; fullDays=True; hoursFrom=; hoursTo=; timeZone=America/Chicago}"
                 }
         ],
         "updatedOn": null,
         "updatedBy": null,
         "createdOn": null,
         "createdBy": null
}

$false if failed