Remove-VPASDPAPolicy


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

DELETE DPA POLICY


Description:

USE THIS FUNCTION TO DELETE A POLICY FROM DPA


Syntax:

Remove-VPASDPAPolicy -PolicyID <String> [-WhatIf] [-HideWhatIfOutput] [-token <Hashtable>] [<CommonParameters>]

Remove-VPASDPAPolicy -PolicyName <String> [-WhatIf] [-HideWhatIfOutput] [-token <Hashtable>] [<CommonParameters>]

Remove-VPASDPAPolicy -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

-WhatIf [<SwitchParameter>]
Run code simulation to see what is affected by running the command as well as any possible implications
This is a code simulation flag, meaning the command will NOT actually run

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

-HideWhatIfOutput [<SwitchParameter>]
Suppress any code simulation output from the console

Required: false
Position: named
Default value: False
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:

$DeletePolicy = Remove-VPASDPAPolicy -PolicyID {POLICY ID VALUE}

$DeletePolicy = Remove-VPASDPAPolicy -PolicyName {POLICY NAME VALUE} -WhatIf

$InputParameters = @{
        PolicyID = "jakhdkja8792-jhgf-8769-b9ae-akhdjks879"
        WhatIf = $true|$false
        HideOutput = $true|$false
}
$DeletePolicy = Remove-VPASDPAPolicy -InputParameters $InputParameters

$InputParameters = @{
        PolicyName = "Vman Access Policy"
        WhatIf = $true|$false
        HideOutput = $true|$false
}
$DeletePolicy = Remove-VPASDPAPolicy -InputParameters $InputParameters


Outputs:

$true if successful

$false if failed