Public/Remove-PegasusAdminOrgUnit.ps1

<#
.SYNOPSIS
Removes an orgunit from the API.

.EXAMPLE
Remove-PegasusAdminOrgUnit -Id "6260c219-a10d-4079-b079-b2ee3655068a"

#>

function Remove-PegasusAdminOrgUnit {
    [CmdletBinding()]

    Param
    (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
        [string]$Id
    )
    
    Process {
        Invoke-PegasusRequest -Endpoint "/admin/orgunits/$Id" -Method DELETE | Out-Null
    }
}