public/Get-OSDeployModulePath.ps1

function Get-OSDeployModulePath {
    <#
    .SYNOPSIS
        Returns the base directory path of the OSDeploy module
 
    .DESCRIPTION
        Returns the file system path to the root folder where the OSDeploy module is installed.
        This is useful for locating module-relative resources such as catalogs, templates, and support files.
 
    .EXAMPLE
        PS> Get-OSDeployModulePath
 
        Returns the absolute directory of the currently loaded OSDeploy module.
 
    .EXAMPLE
        PS> Join-Path -Path (Get-OSDeployModulePath) -ChildPath 'core\module.json'
 
        Returns the path to module.json relative to the currently loaded module.
 
    .INPUTS
        None. This function does not accept pipeline input.
 
    .OUTPUTS
        System.String. Returns the absolute path to the OSDeploy module directory.
 
    .NOTES
        Author: David Segura
        Company: Recast Software
        Version: 1.0.0
        Date: 2026-08-28
 
        Requires the OSDeploy module to be loaded.
    #>

    [CmdletBinding()]
    [OutputType([System.String])]
    param ()

    Write-HostOSDeployBanner
    $MyInvocation.MyCommand.Module.ModuleBase
}