On-Prem Exchange Module Issue

Trying to connect to an on-premises Exchange environment using a wrapper function. When I run it interactively via v5 or v7, it works fine. However, when I try to run it via PowerShell Universal it outputs the below, even though it says it imported the command:

Loading module from path 'C:\Users\JDoe\AppData\Local\Temp\tmp_3vvm40t0.edw\tmp_3vvm40t0.edw.psm1'. 
Importing function 'Get-ExchangeServer'. 

<***Script calls Get-ExchangeServer command here***>

[error] The term 'Get-ExchangeServer' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

If I paste the function inside the script itself, then everything works without issue. Is this possibly a scoping/serialization issue? Or should I be looking at any particular logs (or increasing log verbosity to catch what may be happening)?

Product: PowerShell Universal
Version: 3.9.16