Public/Remove-GCUser.ps1

<#
.SYNOPSIS
    Deletes a user from Genesys Cloud.

.DESCRIPTION
    Removes a user from Genesys Cloud by sending a DELETE request for the specified user ID.
    This action is irreversible and will permanently remove the user.
    API Endpoint: DELETE /api/v2/users/{userId}

.PARAMETER UserId
    The unique identifier of the user to delete.

.EXAMPLE
    Remove-GCUser -UserId '12345678-1234-1234-1234-123456789012'
    Deletes the user with the specified ID.

.NOTES
    Genesys Cloud API: DELETE /api/v2/users/{userId}
#>

function Remove-GCUser {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$UserId
    )

    $endpoint = "users/$UserId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method DELETE
}