function Update-CurrentProcessPsModulePath {
    $machinePSModulePath = [Environment]::GetEnvironmentVariable("PSModulePath", "Machine")
    $userPSModulePath = [Environment]::GetEnvironmentVariable("PSModulePath", "User")
    [Environment]::SetEnvironmentVariable("PSModulePath", $machinePSModulePath + ";" + $userPSModulePath, "Process")
}

export-modulemember -function Update-CurrentProcessPsModulePath

Add a module to update PsModulePath
Add a module to update PsModulePath

This PS module updates the current process' PsModulePath variable
with that set in the environment. This enables a simpler method
for adding PS modules in-script.

This also establishes a location for shared windows-init files
(e.g., modules/daptiv/files/windows-init).
