private/pwsh-GC-delete-request.ps1
function pwsh-GC-delete-request { [cmdletbinding()] param ( [Parameter(Mandatory)] [String]$Uri, [Parameter(Mandatory)] [PSTypeName("GCApiKey")]$ApiKey ) $RequestToken = $ApiKey.Token $RequestUri = $ApiKey.Uri + $Uri try { Invoke-RestMethod -Uri $RequestUri -Method Delete -Authentication Bearer -Token $RequestToken } catch { throw $_.Exception } } |