Private/Helper/Test-IsDomainJoined.ps1

<#
Copyright © 2024 Integris. For internal company use only. All rights reserved.
#>


FUNCTION Test-IsDomainJoined {
    <#
    .SYNOPSIS
    Determines if the system is joined to any domain.
 
    .DESCRIPTION
    This function checks if the system is joined to either an Active Directory domain or Azure Active Directory.
 
    .PARAMETER None
 
    .EXAMPLE
    Test-IsDomainJoined
 
    .NOTES
    The function relies on the Test-IsADJoined and Test-IsAADJoined functions to determine the domain joined status.
    #>


    IF ((Test-IsADJoined) -or (Test-IsAADJoined)) {
        RETURN $True
    }
    Return $False
}