Public/Get-IAMCoreOrgUnit.ps1

<#
.SYNOPSIS
    Gets CoreOrgUnit objects from the IAM Core API.

.DESCRIPTION
    This function retrieves CoreOrgUnit objects from the IAM Core API.

.EXAMPLE
    Get-IAMCoreOrgUnit
#>

function Get-IAMCoreOrgUnit {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $false)]
        [int] $PageSize = 10000
    )

    Get-IAMCoreObject -ObjectType "CoreOrgUnit" -PageSize $PageSize
}