cpcodes/Remove-CPReportingGroup.ps1
function Remove-CPReportingGroup { Param( [Parameter(Mandatory=$true)] [string] $ReportingGroupID, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) $Path = "/cprg/v1/reporting-groups/$ReportingGroupID`?accountSwitchKey=$AccountSwitchKey" try { $Result = Invoke-AkamaiRestMethod -Method DELETE -Path $Path -EdgeRCFile $EdgeRCFile -Section $Section return $Result } catch { throw $_.Exception } } |